From: Stefan Liebler Date: Fri, 7 Oct 2016 07:56:47 +0000 (+0200) Subject: Use libc_ifunc macro for system in libpthread. X-Git-Tag: glibc-2.25~427 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=75685c4d98cf260181879b799e403c6cc37418be;p=thirdparty%2Fglibc.git 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. --- diff --git a/ChangeLog b/ChangeLog index 44c1ef2ec83..4adcebd6908 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2016-10-07 Stefan Liebler + + * nptl/pt-system.c (system_ifunc): Use libc_ifunc macro. + 2016-10-07 Stefan Liebler * rt/clock-compat.c (COMPAT_REDIRECT): Use libc_ifunc macro. diff --git a/nptl/pt-system.c b/nptl/pt-system.c index 56f2a8901f3..cc415daa3d2 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 */