Disable symbol hack in libc_nonshared.a

Don't reference __GI_memmove, __GI_memset, __GI_memcpy, __divdi3_internal,
__udivdi3_internal and __moddi3_internal in libc_nonshared.a.
This commit is contained in:
H.J. Lu 2021-09-23 11:08:11 -07:00
parent 342298278e
commit b0a33dc967
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,7 @@
/* 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
#if !defined __ASSEMBLER__ && IS_IN (libc) && defined SHARED \
&& !defined LIBC_NONSHARED
asm ("memmove = __GI_memmove");
asm ("memset = __GI_memset");
asm ("memcpy = __GI_memcpy");

View File

@ -23,7 +23,8 @@
assembler.
Note: in_divdi3_c is only used to avoid symbol alias on divdi3
build itself. */
#if !defined __ASSEMBLER__ && !defined in_divdi3_c && IS_IN (libc) && defined SHARED
#if !defined __ASSEMBLER__ && !defined in_divdi3_c && IS_IN (libc) \
&& defined SHARED && !defined LIBC_NONSHARED
asm ("__divdi3 = __divdi3_internal");
asm ("__udivdi3 = __udivdi3_internal");
asm ("__moddi3 = __moddi3_internal");