about summary refs log tree commit diff
path: root/sysdeps/aarch64/multiarch
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2017-12-04 21:17:17 +0530
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2017-12-04 21:17:17 +0530
commit4c1d801a5956f049126ef6cbe22ed23693e77a8c (patch)
treea5e2a28dc0fe334834f18708aa7f02a554fc5c76 /sysdeps/aarch64/multiarch
parent478593e6374f3818da39332260dc453cb19cfa1e (diff)
downloadglibc-4c1d801a5956f049126ef6cbe22ed23693e77a8c.tar.gz
glibc-4c1d801a5956f049126ef6cbe22ed23693e77a8c.tar.xz
glibc-4c1d801a5956f049126ef6cbe22ed23693e77a8c.zip
aarch64: Avoid hidden symbols for memcpy/memmove into static binaries
The __GI_* symbol aliases for __memcpy_generic are unnecessary since
they're never used.  Add them only for libc.so to avoid PLT.  Maybe
some time in future we need to evaluate the relative cost of PLT vs
gains from multiarch memcpy implementations and take a call on whether
to drop this completely.

	* sysdeps/aarch64/multiarch/memcpy_generic.S (__GI_memcpy):
	Define only for libc.so.
Diffstat (limited to 'sysdeps/aarch64/multiarch')
-rw-r--r--sysdeps/aarch64/multiarch/memcpy_generic.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/aarch64/multiarch/memcpy_generic.S b/sysdeps/aarch64/multiarch/memcpy_generic.S
index 041a77943d..edb2e52626 100644
--- a/sysdeps/aarch64/multiarch/memcpy_generic.S
+++ b/sysdeps/aarch64/multiarch/memcpy_generic.S
@@ -33,9 +33,11 @@
 # undef libc_hidden_builtin_def
 # define libc_hidden_builtin_def(name)
 
+# ifdef SHARED
 /* It doesn't make sense to send libc-internal memcpy calls through a PLT. */
 	.globl __GI_memcpy; __GI_memcpy = __memcpy_generic
 	.globl __GI_memmove; __GI_memmove = __memmove_generic
+# endif
 
 #endif