[PATCH 6/8] Use libc_ifunc macro for system in libpthread.
Stefan Liebler
stli@linux.vnet.ibm.com
Mon Jul 4 14:10:00 GMT 2016
This updated patch first undefines INIT_ARCH before it is defined.
On 06/23/2016 01:55 PM, Stefan Liebler wrote:
> 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.
> ---
> nptl/pt-system.c | 18 +++---------------
> 1 file changed, 3 insertions(+), 15 deletions(-)
>
> diff --git a/nptl/pt-system.c b/nptl/pt-system.c
> index 56f2a89..6515056 100644
> --- a/nptl/pt-system.c
> +++ b/nptl/pt-system.c
> @@ -32,21 +32,9 @@
>
> # 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;
> +# define INIT_ARCH()
> +libc_ifunc (system_ifunc, &__libc_system)
>
> # else /* !HAVE_IFUNC */
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-Use-libc_ifunc-macro-for-system-in-libpthread.patch
Type: text/x-patch
Size: 1175 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160704/207b6920/attachment.bin>
More information about the Libc-alpha
mailing list