about summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc64
diff options
context:
space:
mode:
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>2014-06-06 09:37:07 -0500
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>2014-06-06 09:37:07 -0500
commited36bfa18faf9be457575568e64b8409e46caa22 (patch)
treedd816eac96eba42ade3daa103076b61edb81f23f /sysdeps/powerpc/powerpc64
parentfc75bf464d128f6a722d6cca7012c996f1f73425 (diff)
downloadglibc-ed36bfa18faf9be457575568e64b8409e46caa22.tar.gz
glibc-ed36bfa18faf9be457575568e64b8409e46caa22.tar.xz
glibc-ed36bfa18faf9be457575568e64b8409e46caa22.zip
PowerPC: Fix optimized strncat strlen call
This patch fixes the optimized ppc64/power7 strncat strlen call for
static build without ifunc enabled.  The strlen symbol to call in such
situation is just strlen, instead of __GI_strlen (since the __GI_
alias is just created for shared objects).
Diffstat (limited to 'sysdeps/powerpc/powerpc64')
-rw-r--r--sysdeps/powerpc/powerpc64/power7/strncat.S6
1 files changed, 5 insertions, 1 deletions
diff --git a/sysdeps/powerpc/powerpc64/power7/strncat.S b/sysdeps/powerpc/powerpc64/power7/strncat.S
index e7e36a4de4..f5ea52d3d4 100644
--- a/sysdeps/powerpc/powerpc64/power7/strncat.S
+++ b/sysdeps/powerpc/powerpc64/power7/strncat.S
@@ -40,7 +40,11 @@
 #ifndef STRLEN
 /* For builds with no IFUNC support, local calls should be made to internal
    GLIBC symbol (created by libc_hidden_builtin_def).  */
-# define STRLEN   __GI_strlen
+# ifdef SHARED
+#  define STRLEN   __GI_strlen
+# else
+#  define STRLEN   strlen
+# endif
 #endif
 
 #define	FRAMESIZE	(FRAME_MIN_SIZE+32)