diff options
author | Zack Weinberg <zackw@panix.com> | 2017-06-08 15:39:03 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2017-06-08 15:39:03 -0400 |
commit | 5046dbb4a7eba5eccfd258f92f4735c9ffc8d069 (patch) | |
tree | 4470480d904b65cf14ca524f96f79eca818c3eaf /REORG.TODO/sysdeps/generic/symbol-hacks.h | |
parent | 199fc19d3aaaf57944ef036e15904febe877fc93 (diff) | |
download | glibc-5046dbb4a7eba5eccfd258f92f4735c9ffc8d069.tar.gz |
Prepare for radical source tree reorganization.zack/build-layout-experiment
All top-level files and directories are moved into a temporary storage
directory, REORG.TODO, except for files that will certainly still
exist in their current form at top level when we're done (COPYING,
COPYING.LIB, LICENSES, NEWS, README), all old ChangeLog files (which
are moved to the new directory OldChangeLogs, instead), and the
generated file INSTALL (which is just deleted; in the new order, there
will be no generated files checked into version control).
Diffstat (limited to 'REORG.TODO/sysdeps/generic/symbol-hacks.h')
-rw-r--r-- | REORG.TODO/sysdeps/generic/symbol-hacks.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/REORG.TODO/sysdeps/generic/symbol-hacks.h b/REORG.TODO/sysdeps/generic/symbol-hacks.h new file mode 100644 index 0000000000..d614c099c9 --- /dev/null +++ b/REORG.TODO/sysdeps/generic/symbol-hacks.h @@ -0,0 +1,19 @@ +/* Some compiler optimizations may transform loops into memset/memmove + calls and without proper declaration it may generate PLT calls. */ +#if !defined __ASSEMBLER__ && IS_IN (libc) && defined SHARED +asm ("memmove = __GI_memmove"); +asm ("memset = __GI_memset"); +asm ("memcpy = __GI_memcpy"); + +/* Some targets do not use __stack_chk_fail_local. In libc.so, + redirect __stack_chk_fail to a hidden reference + __stack_chk_fail_local, to avoid the PLT reference. + __stack_chk_fail itself is a global symbol, exported from libc.so, + and cannot be made hidden. */ + +# if IS_IN (libc) && defined SHARED && \ + defined STACK_PROTECTOR_LEVEL && STACK_PROTECTOR_LEVEL > 0 +asm (".hidden __stack_chk_fail_local\n" + "__stack_chk_fail = __stack_chk_fail_local"); +# endif +#endif |