1/* Some compiler optimizations may transform loops into memset/memmove
2 calls and without proper declaration it may generate PLT calls. */
3#if !defined __ASSEMBLER__ && IS_IN (libc) && defined SHARED \
4 && !defined LIBC_NONSHARED
5asm ("memmove = __GI_memmove");
6asm ("memset = __GI_memset");
7asm ("memcpy = __GI_memcpy");
8
9/* clang might generate the internal fortfify calls when it is enabled,
10 through the buitintin. */
11asm ("__vfprintf_chk = __GI___vfprintf_chk");
12asm ("__vsprintf_chk = __GI___vsprintf_chk");
13asm ("__vsyslog_chk = __GI___vsyslog_chk");
14asm ("__memcpy_chk = __GI___memcpy_chk");
15asm ("__memmove_chk = __GI___memmove_chk");
16asm ("__memset_chk = __GI___memset_chk");
17asm ("__mempcpy_chk = __GI___mempcpy_chk");
18asm ("__stpcpy_chk = __GI___stpcpy_chk");
19asm ("__strcpy_chk = __GI___strcpy_chk");
20asm ("strcpy = __GI_strcpy");
21asm ("strncpy = __GI_strncpy");
22asm ("strcat = __GI_strcat");
23asm ("strlen = __GI_strlen");
24
25/* Some targets do not use __stack_chk_fail_local. In libc.so,
26 redirect __stack_chk_fail to a hidden reference
27 __stack_chk_fail_local, to avoid the PLT reference.
28 __stack_chk_fail itself is a global symbol, exported from libc.so,
29 and cannot be made hidden. */
30
31# if IS_IN (libc) && defined SHARED \
32 && defined STACK_PROTECTOR_LEVEL && STACK_PROTECTOR_LEVEL > 0
33asm (".hidden __stack_chk_fail_local\n"
34 "__stack_chk_fail = __stack_chk_fail_local");
35# endif
36#endif