aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/symbol-hacks.h7
-rw-r--r--sysdeps/wordsize-32/symbol-hacks.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h
index bc7b4c4..9eaf014 100644
--- a/sysdeps/generic/symbol-hacks.h
+++ b/sysdeps/generic/symbol-hacks.h
@@ -1 +1,6 @@
-/* Fortunately nothing to do. */
+/* Some compiler optimizations may transform loops into memset/memmove
+ calls and without proper declaration it may generate PLT calls. */
+#if !defined __ASSEMBLER__ && !defined NOT_IN_libc && defined SHARED
+asm ("memmove = __GI_memmove");
+asm ("memset = __GI_memset");
+#endif
diff --git a/sysdeps/wordsize-32/symbol-hacks.h b/sysdeps/wordsize-32/symbol-hacks.h
index 52ac5c1..202a807 100644
--- a/sysdeps/wordsize-32/symbol-hacks.h
+++ b/sysdeps/wordsize-32/symbol-hacks.h
@@ -16,6 +16,8 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include_next "symbol-hacks.h"
+
/* A very dirty trick: gcc emits references to __divdi3, __udivdi3,
__moddi3, and __umoddi3. These functions are exported and
therefore we get PLTs. Unnecessarily so. Changing gcc is a big