2013-06-12 15:21:22 +00:00
|
|
|
/* Some compiler optimizations may transform loops into memset/memmove
|
|
|
|
calls and without proper declaration it may generate PLT calls. */
|
2021-09-23 18:08:11 +00:00
|
|
|
#if !defined __ASSEMBLER__ && IS_IN (libc) && defined SHARED \
|
|
|
|
&& !defined LIBC_NONSHARED
|
2013-06-12 15:21:22 +00:00
|
|
|
asm ("memmove = __GI_memmove");
|
|
|
|
asm ("memset = __GI_memset");
|
2014-04-29 19:15:45 +00:00
|
|
|
asm ("memcpy = __GI_memcpy");
|
2016-12-26 09:08:57 +00:00
|
|
|
|
|
|
|
/* 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. */
|
|
|
|
|
2019-02-25 13:19:19 +00:00
|
|
|
# if IS_IN (libc) && defined SHARED \
|
|
|
|
&& defined STACK_PROTECTOR_LEVEL && STACK_PROTECTOR_LEVEL > 0
|
2016-12-26 09:08:57 +00:00
|
|
|
asm (".hidden __stack_chk_fail_local\n"
|
|
|
|
"__stack_chk_fail = __stack_chk_fail_local");
|
|
|
|
# endif
|
2013-06-12 15:21:22 +00:00
|
|
|
#endif
|