symbol-hacks.h 779 B

12345678910111213141516171819
  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. asm ("memmove = __GI_memmove");
  5. asm ("memset = __GI_memset");
  6. asm ("memcpy = __GI_memcpy");
  7. /* Some targets do not use __stack_chk_fail_local. In libc.so,
  8. redirect __stack_chk_fail to a hidden reference
  9. __stack_chk_fail_local, to avoid the PLT reference.
  10. __stack_chk_fail itself is a global symbol, exported from libc.so,
  11. and cannot be made hidden. */
  12. # if IS_IN (libc) && defined SHARED && \
  13. defined STACK_PROTECTOR_LEVEL && STACK_PROTECTOR_LEVEL > 0
  14. asm (".hidden __stack_chk_fail_local\n"
  15. "__stack_chk_fail = __stack_chk_fail_local");
  16. # endif
  17. #endif