about summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul.c')
-rw-r--r--sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul.c
index d17dfa4fcf..b11e2a4ff7 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul.c
@@ -16,22 +16,23 @@
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
-#if IS_IN (libc)
+#if defined SHARED && IS_IN (libc)
+# define __strchrnul __redirect___strchrnul
+# define strchrnul __redirect_strchrnul
 # include <string.h>
 # include <shlib-compat.h>
 # include "init-arch.h"
 
 extern __typeof (__strchrnul) __strchrnul_ppc attribute_hidden;
 extern __typeof (__strchrnul) __strchrnul_power7 attribute_hidden;
+# undef __strchrnul
+# undef strchrnul
 
 /* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle
    ifunc symbol properly.  */
-libc_ifunc (__strchrnul,
-	    (hwcap & PPC_FEATURE_HAS_VSX)
-            ? __strchrnul_power7
-            : __strchrnul_ppc);
-
+libc_ifunc_redirected (__redirect___strchrnul, __strchrnul,
+		       (hwcap & PPC_FEATURE_HAS_VSX)
+		       ? __strchrnul_power7
+		       : __strchrnul_ppc);
 weak_alias (__strchrnul, strchrnul)
-#else
-#include <string/strchrnul.c>
 #endif