diff options
Diffstat (limited to 'sysdeps/powerpc')
-rw-r--r-- | sysdeps/powerpc/powerpc32/power4/multiarch/memrchr-ppc32.c | 10 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc32/power4/multiarch/memrchr.c | 12 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc32/power7/memrchr.S | 1 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/multiarch/memrchr.c | 18 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/power7/memrchr.S | 1 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/power8/memrchr.S | 1 |
6 files changed, 28 insertions, 15 deletions
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr-ppc32.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr-ppc32.c index 62e7a12989..038c5f4532 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr-ppc32.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr-ppc32.c @@ -23,3 +23,13 @@ extern void *__memrchr_ppc (const void *, int, size_t); #endif #include <string/memrchr.c> +# if IS_IN (libc) +# undef __memrchr +# ifdef SHARED +__hidden_ver1 (__memrchr_ppc, __GI___memrchr, __memrchr_ppc); +strong_alias (__memrchr_ppc, __memrchr_ppc1); +__hidden_ver1 (__memrchr_ppc1, __memrchr, __memrchr_ppc1); +# else +strong_alias (__memrchr_ppc, __memrchr) +# endif +#endif diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr.c index 8c1385fe6a..fb0d2c0617 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr.c @@ -17,21 +17,21 @@ <https://www.gnu.org/licenses/>. */ #if IS_IN (libc) +# define memrchr __redirect_memrchr # include <string.h> # include <shlib-compat.h> # include "init-arch.h" extern __typeof (__memrchr) __memrchr_ppc attribute_hidden; extern __typeof (__memrchr) __memrchr_power7 attribute_hidden; +# undef memrchr /* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle ifunc symbol properly. */ -libc_ifunc (__memrchr, - (hwcap & PPC_FEATURE_HAS_VSX) - ? __memrchr_power7 - : __memrchr_ppc); - -weak_alias (__memrchr, memrchr) +libc_ifunc_redirected (__redirect_memrchr, memrchr, + (hwcap & PPC_FEATURE_HAS_VSX) + ? __memrchr_power7 + : __memrchr_ppc); #else #include <string/memrchr.c> #endif diff --git a/sysdeps/powerpc/powerpc32/power7/memrchr.S b/sysdeps/powerpc/powerpc32/power7/memrchr.S index 9c70517d37..9f0f17fa46 100644 --- a/sysdeps/powerpc/powerpc32/power7/memrchr.S +++ b/sysdeps/powerpc/powerpc32/power7/memrchr.S @@ -191,5 +191,6 @@ L(loop_small): blr END (__memrchr) +libc_hidden_def (__memrchr) weak_alias (__memrchr, memrchr) libc_hidden_builtin_def (memrchr) diff --git a/sysdeps/powerpc/powerpc64/multiarch/memrchr.c b/sysdeps/powerpc/powerpc64/multiarch/memrchr.c index 59527a83eb..5e7c00fdce 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/memrchr.c +++ b/sysdeps/powerpc/powerpc64/multiarch/memrchr.c @@ -17,6 +17,7 @@ <https://www.gnu.org/licenses/>. */ #if IS_IN (libc) +# define memrchr __redirect_memrchr # include <string.h> # include <shlib-compat.h> # include "init-arch.h" @@ -24,18 +25,17 @@ extern __typeof (__memrchr) __memrchr_ppc attribute_hidden; extern __typeof (__memrchr) __memrchr_power7 attribute_hidden; extern __typeof (__memrchr) __memrchr_power8 attribute_hidden; +# undef memrchr /* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle ifunc symbol properly. */ -libc_ifunc (__memrchr, - (hwcap2 & PPC_FEATURE2_ARCH_2_07 - && hwcap & PPC_FEATURE_HAS_ALTIVEC) - ? __memrchr_power8 : - (hwcap & PPC_FEATURE_ARCH_2_06) - ? __memrchr_power7 - : __memrchr_ppc); - -weak_alias (__memrchr, memrchr) +libc_ifunc_redirected (__redirect_memrchr, memrchr, + (hwcap2 & PPC_FEATURE2_ARCH_2_07 + && hwcap & PPC_FEATURE_HAS_ALTIVEC) + ? __memrchr_power8 : + (hwcap & PPC_FEATURE_ARCH_2_06) + ? __memrchr_power7 + : __memrchr_ppc); #else #include <string/memrchr.c> #endif diff --git a/sysdeps/powerpc/powerpc64/power7/memrchr.S b/sysdeps/powerpc/powerpc64/power7/memrchr.S index 56e79f3cd5..3b0430ccff 100644 --- a/sysdeps/powerpc/powerpc64/power7/memrchr.S +++ b/sysdeps/powerpc/powerpc64/power7/memrchr.S @@ -196,5 +196,6 @@ L(loop_small): blr END (MEMRCHR) +libc_hidden_def (__memrchr) weak_alias (__memrchr, memrchr) libc_hidden_builtin_def (memrchr) diff --git a/sysdeps/powerpc/powerpc64/power8/memrchr.S b/sysdeps/powerpc/powerpc64/power8/memrchr.S index fec76cf586..ebe4017968 100644 --- a/sysdeps/powerpc/powerpc64/power8/memrchr.S +++ b/sysdeps/powerpc/powerpc64/power8/memrchr.S @@ -332,5 +332,6 @@ L(loop_small): blr END (MEMRCHR) +libc_hidden_def (__memrchr) weak_alias (__memrchr, memrchr) libc_hidden_builtin_def (memrchr) |