[prev in list] [next in list] [prev in thread] [next in thread] 

List:       glibc-cvs
Subject:    [glibc] Disable symbol hack in libc_nonshared.a
From:       "H.J. Lu via Glibc-cvs" <glibc-cvs () sourceware ! org>
Date:       2021-09-27 14:50:41
Message-ID: 20210927145041.6B69A3858D3C () sourceware ! org
[Download RAW message or body]

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b0a33dc967f98cca4b480434d1eec9cf41c61154

commit b0a33dc967f98cca4b480434d1eec9cf41c61154
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Sep 23 11:08:11 2021 -0700

    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.

Diff:
---
 sysdeps/generic/symbol-hacks.h            | 3 ++-
 sysdeps/wordsize-32/divdi3-symbol-hacks.h | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h
index 3586e6ed38..1115e4c0a7 100644
--- a/sysdeps/generic/symbol-hacks.h
+++ b/sysdeps/generic/symbol-hacks.h
@@ -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");
diff --git a/sysdeps/wordsize-32/divdi3-symbol-hacks.h b/sysdeps/wordsize-32/divdi3-symbol-hacks.h
index 3e7c54bd0c..efbb0cce8b 100644
--- a/sysdeps/wordsize-32/divdi3-symbol-hacks.h
+++ b/sysdeps/wordsize-32/divdi3-symbol-hacks.h
@@ -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");
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic