diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2011-04-01 19:38:21 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-04-01 19:38:21 -0400 |
commit | 0354e355014b7bfda32622e0255399d859862fcd (patch) | |
tree | d2f823c407add9a82d7b6b3c055b78a9811914cb /sysdeps/x86_64/multiarch | |
parent | 8593482f5ec33daa90fca63db380edc8283c39df (diff) | |
download | glibc-0354e355014b7bfda32622e0255399d859862fcd.tar glibc-0354e355014b7bfda32622e0255399d859862fcd.tar.gz glibc-0354e355014b7bfda32622e0255399d859862fcd.tar.bz2 glibc-0354e355014b7bfda32622e0255399d859862fcd.zip |
Work around old buggy program which cannot cope with memcpy semantics.
Diffstat (limited to 'sysdeps/x86_64/multiarch')
-rw-r--r-- | sysdeps/x86_64/multiarch/memcpy.S | 12 | ||||
-rw-r--r-- | sysdeps/x86_64/multiarch/memmove.c | 8 |
2 files changed, 15 insertions, 5 deletions
diff --git a/sysdeps/x86_64/multiarch/memcpy.S b/sysdeps/x86_64/multiarch/memcpy.S index 8e9fb190d3..9863014f55 100644 --- a/sysdeps/x86_64/multiarch/memcpy.S +++ b/sysdeps/x86_64/multiarch/memcpy.S @@ -1,5 +1,6 @@ /* Multiple versions of memcpy - Copyright (C) 2010 Free Software Foundation, Inc. + Copyright (C) 2010, 2011 + Free Software Foundation, Inc. Contributed by Intel Corporation. This file is part of the GNU C Library. @@ -19,6 +20,7 @@ 02111-1307 USA. */ #include <sysdep.h> +#include <shlib-compat.h> #include <init-arch.h> /* Define multiple versions only for the definition in lib and for @@ -26,8 +28,8 @@ happened. */ #if defined SHARED && !defined NOT_IN_libc .text -ENTRY(memcpy) - .type memcpy, @gnu_indirect_function +ENTRY(__new_memcpy) + .type __new_memcpy, @gnu_indirect_function cmpl $0, KIND_OFFSET+__cpu_features(%rip) jne 1f call __init_cpu_features @@ -39,7 +41,7 @@ ENTRY(memcpy) jz 2f leaq __memcpy_ssse3_back(%rip), %rax 2: ret -END(memcpy) +END(__new_memcpy) # undef ENTRY # define ENTRY(name) \ @@ -68,6 +70,8 @@ END(memcpy) by the indirect call in the PLT. */ # define libc_hidden_builtin_def(name) \ .globl __GI_memcpy; __GI_memcpy = __memcpy_sse2 + +versioned_symbol (libc, __new_memcpy, memcpy, GLIBC_2_14); #endif #include "../memcpy.S" diff --git a/sysdeps/x86_64/multiarch/memmove.c b/sysdeps/x86_64/multiarch/memmove.c index 379862722b..04de891293 100644 --- a/sysdeps/x86_64/multiarch/memmove.c +++ b/sysdeps/x86_64/multiarch/memmove.c @@ -1,5 +1,6 @@ /* Multiple versions of memmove. - Copyright (C) 2010 Free Software Foundation, Inc. + Copyright (C) 2010, 2011 + Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +21,7 @@ #include <string.h> #ifndef NOT_IN_libc +#include <shlib-compat.h> #include "init-arch.h" #define MEMMOVE __memmove_sse2 @@ -42,4 +44,8 @@ libc_ifunc (memmove, ? (HAS_FAST_COPY_BACKWARD ? __memmove_ssse3_back : __memmove_ssse3) : __memmove_sse2); + +#if SHLIB_COMPAT (libc, GLIBC_2_2_5, GLIBC_2_14) +compat_symbol (libc, memmove, memcpy, GLIBC_2_2_5); +#endif #endif |