summary refs log tree commit diff
path: root/nptl/pt-system.c
diff options
context:
space:
mode:
authorStefan Liebler <stli@linux.vnet.ibm.com>2016-10-07 09:56:47 +0200
committerStefan Liebler <stli@linux.vnet.ibm.com>2016-10-07 10:12:47 +0200
commit75685c4d98cf260181879b799e403c6cc37418be (patch)
treeedd52ea1efc9dc9ef20d8bb99505a002529789ef /nptl/pt-system.c
parent98ac7b7c85429913c94a9bd9fbe74bb5a333d224 (diff)
downloadglibc-75685c4d98cf260181879b799e403c6cc37418be.tar.gz
glibc-75685c4d98cf260181879b799e403c6cc37418be.tar.xz
glibc-75685c4d98cf260181879b799e403c6cc37418be.zip
Use libc_ifunc macro for system in libpthread.
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.
Diffstat (limited to 'nptl/pt-system.c')
-rw-r--r--nptl/pt-system.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/nptl/pt-system.c b/nptl/pt-system.c
index 56f2a8901f..cc415daa3d 100644
--- a/nptl/pt-system.c
+++ b/nptl/pt-system.c
@@ -32,21 +32,10 @@
 
 # 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 */