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]

GNU C Library master sources branch master updated. glibc-2.19-455-g3d2bada

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  3d2badacf185fac740a2992240a817fb2ca325af (commit)
      from  df54acbb7b0a2efe22e7bf369ff1055211b9fe58 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------;a=commitdiff;h=3d2badacf185fac740a2992240a817fb2ca325af

commit 3d2badacf185fac740a2992240a817fb2ca325af
Author: Adhemerval Zanella <>
Date:   Thu May 22 07:53:44 2014 -0500

    PowerPC: Fix memchr ifunc hidden symbol for PPC32
    This patch fixes a similar issue to
    736c304a1ab4cee36a2f3343f1698bc0abae4608, where for PPC32 if the symbol
    is defined as hidden (memchr) then compiler will create a local branc
    (symbol@local) and the linker will not create a required PLT call to
    make the ifunc work.  It changes the default hidden symbol (__GI_memchr)
    to default memchr symbol for powerpc32 (__memchr_ppc32).

diff --git a/ChangeLog b/ChangeLog
index e538bca..77fed0c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2014-05-22  Adhemerval Zanella  <>
+	* sysdeps/powerpc/powerpc32/power4/multiarch/memchr.c (memchr): Remove
+	libc_hidden_builtin_def to ifunc.
+	* sysdeps/powerpc/powerpc32/power4/multiarch/memchr-ppc32.c
+	[libc_hidden_builtin_def]: Define hidden definition to __memchr_ppc32.
 2014-05-16  Roland McGrath  <>
 	* sysdeps/unix/sysv/linux/aarch64/arch-fork.h: New file.
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memchr-ppc32.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memchr-ppc32.c
index 4bd6bb9..f5db4a8 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/memchr-ppc32.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memchr-ppc32.c
@@ -25,7 +25,8 @@
 #ifdef SHARED
 # undef libc_hidden_builtin_def
-# define libc_hidden_builtin_def(name)
+# define libc_hidden_builtin_def(name) \
+  __hidden_ver1(__memchr_ppc, __GI_memchr, __memchr_ppc);
 extern __typeof (memchr) __memchr_ppc attribute_hidden;
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memchr.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memchr.c
index ca0f714..94c22ef 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/memchr.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memchr.c
@@ -17,22 +17,25 @@
    <>.  */
 #ifndef NOT_IN_libc
+# undef memcpy
+/* Redefine memchr so that the compiler won't make the weak_alias point
+   to internal hidden definition (__GI_memchr), since PPC32 does not
+   support local IFUNC calls.  */
+# define memchr __redirect_memchr
 # include <string.h>
-# include <shlib-compat.h>
 # include "init-arch.h"
-extern __typeof (__memchr) __memchr_ppc attribute_hidden;
-extern __typeof (__memchr) __memchr_power7 attribute_hidden;
+extern __typeof (__redirect_memchr) __memchr_ppc attribute_hidden;
+extern __typeof (__redirect_memchr) __memchr_power7 attribute_hidden;
-/* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle
-   ifunc symbol properly.  */
-libc_ifunc (__memchr,
+extern __typeof (__redirect_memchr) __libc_memchr;
+libc_ifunc (__libc_memchr,
 	    (hwcap & PPC_FEATURE_HAS_VSX)
             ? __memchr_power7
             : __memchr_ppc);
-weak_alias (__memchr, memchr)
-libc_hidden_builtin_def (memchr)
+#undef memchr
+weak_alias (__libc_memchr, memchr)
 #include <string/memchr.c>


Summary of changes:
 ChangeLog                                          |    7 ++++++
 .../powerpc32/power4/multiarch/memchr-ppc32.c      |    3 +-
 .../powerpc/powerpc32/power4/multiarch/memchr.c    |   21 +++++++++++--------
 3 files changed, 21 insertions(+), 10 deletions(-)

GNU C Library master sources

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