This is the mail archive of the glibc-cvs@sourceware.org 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-468-g900e445


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  900e445fad9bf301a42c0d0008cce504ad94050e (commit)
       via  8820e3acc3bb95b9b0921fe0c0711aae19f1da94 (commit)
      from  e59252a58edad4bf74a094e22a70811d5585c60f (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 -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=900e445fad9bf301a42c0d0008cce504ad94050e

commit 900e445fad9bf301a42c0d0008cce504ad94050e
Author: Richard Henderson <rth@twiddle.net>
Date:   Fri May 23 16:03:28 2014 -0700

    Only provide non-default symbols in libpthread for vfork
    
    	* nptl/pt-vfork.c (vfork_resolve): Rename from vfork_ifunc.
    	(vfork, __vfork): Define via compat_symbol.

diff --git a/ChangeLog b/ChangeLog
index 11b3521..271e31d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2014-05-23  Richard Henderson  <rth@twiddle.net>
 
+	* nptl/pt-vfork.c (vfork_resolve): Rename from vfork_ifunc.
+	(vfork, __vfork): Define via compat_symbol.
+
 	* nptl/pt-vfork.c: Error if !HAVE_IFUNC.
 	[!HAVE_IFUNC] (vfork_compat): Remove.
 	[!HAVE_IFUNC] (DEFINE_VFORK): Remove.
diff --git a/nptl/pt-vfork.c b/nptl/pt-vfork.c
index eaffe48..f3858c2 100644
--- a/nptl/pt-vfork.c
+++ b/nptl/pt-vfork.c
@@ -46,30 +46,32 @@
 
 extern __typeof (vfork) __libc_vfork;   /* Defined in libc.  */
 
-attribute_hidden __attribute__ ((used))
-__typeof (vfork) *
-vfork_ifunc (void)
+static __typeof (vfork) *
+__attribute__ ((used))
+vfork_resolve (void)
 {
   return &__libc_vfork;
 }
 
 # ifdef HAVE_ASM_SET_DIRECTIVE
 #  define DEFINE_VFORK(name) \
-  asm (".set " #name ", vfork_ifunc\n" \
+  asm (".set " #name ", vfork_resolve\n" \
        ".globl " #name "\n" \
        ".type " #name ", %gnu_indirect_function");
 # else
 #  define DEFINE_VFORK(name) \
-  asm (#name " = vfork_ifunc\n" \
+  asm (#name " = vfork_resolve\n" \
        ".globl " #name "\n" \
        ".type " #name ", %gnu_indirect_function");
 # endif
 #endif
 
 #if SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_20)
-DEFINE_VFORK (vfork)
+DEFINE_VFORK (vfork_ifunc)
+compat_symbol (libpthread, vfork_ifunc, vfork, GLIBC_2_0);
 #endif
 
 #if SHLIB_COMPAT (libpthread, GLIBC_2_1_2, GLIBC_2_20)
-DEFINE_VFORK (__vfork)
+DEFINE_VFORK (__vfork_ifunc)
+compat_symbol (libpthread, __vfork_ifunc, __vfork, GLIBC_2_1_2);
 #endif

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8820e3acc3bb95b9b0921fe0c0711aae19f1da94

commit 8820e3acc3bb95b9b0921fe0c0711aae19f1da94
Author: Richard Henderson <rth@twiddle.net>
Date:   Fri May 23 15:24:20 2014 -0700

    Only support ifunc in nptl/pt-vfork.c
    
    	* nptl/pt-vfork.c: Error if !HAVE_IFUNC.
    	[!HAVE_IFUNC] (vfork_compat): Remove.
    	[!HAVE_IFUNC] (DEFINE_VFORK): Remove.

diff --git a/ChangeLog b/ChangeLog
index 3ea921b..11b3521 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-05-23  Richard Henderson  <rth@twiddle.net>
+
+	* nptl/pt-vfork.c: Error if !HAVE_IFUNC.
+	[!HAVE_IFUNC] (vfork_compat): Remove.
+	[!HAVE_IFUNC] (DEFINE_VFORK): Remove.
+
 2014-05-23  Joseph Myers  <joseph@codesourcery.com>
 
 	[BZ #16978]
diff --git a/nptl/pt-vfork.c b/nptl/pt-vfork.c
index 81d1b71..eaffe48 100644
--- a/nptl/pt-vfork.c
+++ b/nptl/pt-vfork.c
@@ -28,13 +28,24 @@
    vfork symbols in libpthread.so; so we define them using IFUNC to
    redirect to the libc function.  */
 
+/* Note! If the architecture doesn't support IFUNC, then we need an
+   alternate target-specific mechanism to implement this.  So we just
+   assume IFUNC here and require that the target override this file
+   if necessary.
+
+   If the architecture can assume all supported versions of gcc will
+   produce a tail-call to __libc_vfork, consider including the version
+   in sysdeps/unix/sysv/linux/aarch64/pt-vfork.c.  */
+
+#if !HAVE_IFUNC
+# error "must write pt-vfork for this machine or get IFUNC support"
+#endif
+
 #if (SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_20) \
      || SHLIB_COMPAT (libpthread, GLIBC_2_1_2, GLIBC_2_20))
 
 extern __typeof (vfork) __libc_vfork;   /* Defined in libc.  */
 
-# ifdef HAVE_IFUNC
-
 attribute_hidden __attribute__ ((used))
 __typeof (vfork) *
 vfork_ifunc (void)
@@ -42,29 +53,16 @@ vfork_ifunc (void)
   return &__libc_vfork;
 }
 
-#  ifdef HAVE_ASM_SET_DIRECTIVE
-#   define DEFINE_VFORK(name) \
+# ifdef HAVE_ASM_SET_DIRECTIVE
+#  define DEFINE_VFORK(name) \
   asm (".set " #name ", vfork_ifunc\n" \
        ".globl " #name "\n" \
        ".type " #name ", %gnu_indirect_function");
-#  else
-#   define DEFINE_VFORK(name) \
+# else
+#  define DEFINE_VFORK(name) \
   asm (#name " = vfork_ifunc\n" \
        ".globl " #name "\n" \
        ".type " #name ", %gnu_indirect_function");
-#  endif
-
-# else
-
-attribute_hidden
-pid_t
-vfork_compat (void)
-{
-  return __libc_vfork ();
-}
-
-# define DEFINE_VFORK(name)     weak_alias (vfork_compat, name)
-
 # endif
 #endif
 

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog       |    9 +++++++++
 nptl/pt-vfork.c |   52 ++++++++++++++++++++++++++--------------------------
 2 files changed, 35 insertions(+), 26 deletions(-)


hooks/post-receive
-- 
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]