about summary refs log tree commit diff
path: root/sysdeps/x86_64/memcpy.S
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2011-04-01 19:38:21 -0400
committerUlrich Drepper <drepper@gmail.com>2011-04-01 19:38:21 -0400
commit0354e355014b7bfda32622e0255399d859862fcd (patch)
treed2f823c407add9a82d7b6b3c055b78a9811914cb /sysdeps/x86_64/memcpy.S
parent8593482f5ec33daa90fca63db380edc8283c39df (diff)
downloadglibc-0354e355014b7bfda32622e0255399d859862fcd.tar.gz
glibc-0354e355014b7bfda32622e0255399d859862fcd.tar.xz
glibc-0354e355014b7bfda32622e0255399d859862fcd.zip
Work around old buggy program which cannot cope with memcpy semantics.
Diffstat (limited to 'sysdeps/x86_64/memcpy.S')
-rw-r--r--sysdeps/x86_64/memcpy.S11
1 files changed, 11 insertions, 0 deletions
diff --git a/sysdeps/x86_64/memcpy.S b/sysdeps/x86_64/memcpy.S
index b4545ac9f7..724d44e6ce 100644
--- a/sysdeps/x86_64/memcpy.S
+++ b/sysdeps/x86_64/memcpy.S
@@ -31,6 +31,12 @@
 #  define RETVAL	(0)
 #else
 #  define RETVAL	(-8)
+#  if defined SHARED && !defined USE_MULTIARCH && !defined NOT_IN_libc
+#    define memcpy	__memcpy
+#    undef libc_hidden_builtin_def
+#    define libc_hidden_builtin_def(name) \
+	.globl __GI_memcpy; __GI_memcpy = __memcpy
+#  endif
 #endif
 #define SAVE0	(RETVAL - 8)
 #define SAVE1	(SAVE0	- 8)
@@ -571,4 +577,9 @@ END(memcpy)
 
 #ifndef USE_AS_MEMPCPY
 libc_hidden_builtin_def (memcpy)
+# if defined SHARED && !defined USE_MULTIARCH && !defined NOT_IN_libc
+#  undef memcpy
+#  include <shlib-compat.h>
+versioned_symbol (libc, __memcpy, memcpy, GLIBC_2_14);
+# endif
 #endif