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 rth/nptl-vfork created. glibc-2.19-468-g142c59d


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, rth/nptl-vfork has been created
        at  142c59d3d68ed2d2859450bb7a9f95b75819f991 (commit)

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=142c59d3d68ed2d2859450bb7a9f95b75819f991

commit 142c59d3d68ed2d2859450bb7a9f95b75819f991
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_ifunc): Define via attribute ifunc.
    	(DEFINE_VFORK): Remove.
    	(vfork, __vfork): Define via compat_symbol.

diff --git a/nptl/pt-vfork.c b/nptl/pt-vfork.c
index 8beb121..78c0781 100644
--- a/nptl/pt-vfork.c
+++ b/nptl/pt-vfork.c
@@ -42,30 +42,21 @@
 
 extern __typeof (vfork) __libc_vfork;   /* Defined in libc.  */
 
-attribute_hidden __attribute__ ((used))
-__typeof (vfork) *
-vfork_ifunc (void)
+static __typeof (vfork) *
+vfork_resolve (void)
 {
   return &__libc_vfork;
 }
 
-# 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) \
-  asm (#name " = vfork_ifunc\n" \
-       ".globl " #name "\n" \
-       ".type " #name ", %gnu_indirect_function");
-# endif
+void *vfork_ifunc(void *, const void *, size_t)
+     __attribute__ ((ifunc ("vfork_resolve")));
 #endif
 
 #if SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_20)
-DEFINE_VFORK (vfork)
+compat_symbol (libpthread, vfork_ifunc, vfork, GLIBC_2_0);
 #endif
 
 #if SHLIB_COMPAT (libpthread, GLIBC_2_1_2, GLIBC_2_20)
-DEFINE_VFORK (__vfork)
+strong_alias (vfork_ifunc, vfork_ifunc2)
+compat_symbol (libpthread, vfork_ifunc2, __vfork, GLIBC_2_1_2);
 #endif

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

commit 6883d73b952dade8ac55a1639104829b98630405
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/nptl/pt-vfork.c b/nptl/pt-vfork.c
index 81d1b71..8beb121 100644
--- a/nptl/pt-vfork.c
+++ b/nptl/pt-vfork.c
@@ -28,13 +28,20 @@
    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 !HAVE_IFUNC
+# error
+#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 +49,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
 

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


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]