]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Use libc_ifunc macro for system in libpthread.
authorStefan Liebler <stli@linux.vnet.ibm.com>
Fri, 7 Oct 2016 07:56:47 +0000 (09:56 +0200)
committerStefan Liebler <stli@linux.vnet.ibm.com>
Fri, 7 Oct 2016 08:12:47 +0000 (10:12 +0200)
This patch uses the libc_ifunc macro to create already existing ifunc function
system_ifunc if HAVE_IFUNC is defined.

ChangeLog:

* nptl/pt-system.c (system_ifunc): Use libc_ifunc macro.

ChangeLog
nptl/pt-system.c

index 44c1ef2ec8367c3fb8b30bfe682cb7dce41ba592..4adcebd6908ed861a8518b059b5457890120a5f4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-10-07  Stefan Liebler  <stli@linux.vnet.ibm.com>
+
+       * nptl/pt-system.c (system_ifunc): Use libc_ifunc macro.
+
 2016-10-07  Stefan Liebler  <stli@linux.vnet.ibm.com>
 
        * rt/clock-compat.c (COMPAT_REDIRECT): Use libc_ifunc macro.
index 56f2a8901f3c8e7707cd85705d4cf2796a42b48d..cc415daa3d28fb4fcf20f7aba49b2b16aafe4980 100644 (file)
 
 # if HAVE_IFUNC
 
-static __typeof (system) *
-__attribute__ ((used))
-system_resolve (void)
-{
-  return &__libc_system;
-}
-
-asm (".globl system_ifunc\n"
-     ".type system_ifunc, %gnu_indirect_function");
-
-#  ifdef HAVE_ASM_SET_DIRECTIVE
-asm (".set system_ifunc, system_resolve");
-#  else
-asm ("system_ifunc = system_resolve");
-#  endif
+extern __typeof(system) system_ifunc;
+#  undef INIT_ARCH
+#  define INIT_ARCH()
+libc_ifunc (system_ifunc, &__libc_system)
 
 # else  /* !HAVE_IFUNC */