diff options
author | pfg <pfg@FreeBSD.org> | 2015-08-14 03:03:13 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2015-08-14 03:03:13 +0000 |
commit | 9b366d35eed6cd2ffaa720799d9d53fdaf4bd9cc (patch) | |
tree | 79662eb10c6396b4741353e9ed4e5cbb01384bc7 /lib/libc/secure/stack_protector_compat.c | |
parent | 0488e0470dfbdecc7c8865fc260ffa15c3d5e91f (diff) | |
download | FreeBSD-src-9b366d35eed6cd2ffaa720799d9d53fdaf4bd9cc.zip FreeBSD-src-9b366d35eed6cd2ffaa720799d9d53fdaf4bd9cc.tar.gz |
Move the stack protector to a new "secure" directory
As part of the code refactoring to support FORTIFY_SOURCE we want
a new subdirectory "secure" to keep the files related to security.
Move the stack protector functions to this new directory.
No functional change.
Differential Review: https://reviews.freebsd.org/D3333
Diffstat (limited to 'lib/libc/secure/stack_protector_compat.c')
-rw-r--r-- | lib/libc/secure/stack_protector_compat.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/libc/secure/stack_protector_compat.c b/lib/libc/secure/stack_protector_compat.c new file mode 100644 index 0000000..cacb863 --- /dev/null +++ b/lib/libc/secure/stack_protector_compat.c @@ -0,0 +1,20 @@ +/* + * Written by Alexander Kabaev <kan@FreeBSD.org> + * The file is in public domain. + */ + +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + +void __stack_chk_fail(void); + +#ifdef PIC +void +__stack_chk_fail_local_hidden(void) +{ + + __stack_chk_fail(); +} + +__sym_compat(__stack_chk_fail_local, __stack_chk_fail_local_hidden, FBSD_1.0); +#endif |