This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[COMMITTED] 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).
 ChangeLog                                  | 5 +++++
 sysdeps/powerpc/powerpc64/power7/strncat.S | 6 +++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 8fe1ad0..1b1f398 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-06-06  Adhemerval Zanella  <>
+	* sysdeps/powerpc/powerpc64/power7/strncat.S [STRLEN]: Define it as
+	strlen for non SHARED builds.
 2014-06-05  Siddhesh Poyarekar  <>
 	* nptl/allocatestack.c (check_list): Inlined function...
diff --git a/sysdeps/powerpc/powerpc64/power7/strncat.S b/sysdeps/powerpc/powerpc64/power7/strncat.S
index e7e36a4..f5ea52d 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]