[PATCH 1/8] Use gcc attribute ifunc in libc_ifunc macro instead of inline assembly due to false debuginfo.

Florian Weimer fweimer@redhat.com
Mon Jul 4 08:31:00 GMT 2016


On 06/23/2016 01:55 PM, Stefan Liebler wrote:

> This patch adjusts the common libc_ifunc and libm_ifunc macro to use gcc
> attribute ifunc. Due to this change, the macro users where the __GI_* symbol
> does not target the ifunc symbol have to be prepared with the redirection
> construct.
>
> This patch also prepares the libc_ifunc macro to be useable in s390-ifunc-macro.
> The s390 ifunc-resolver-functions do have an hwcaps parameter and not all
> resolvers need the same initialization code. The next patch in this series
> changes the s390 ifunc macros to use this common one.
>
> Tested the whole patchset by building glibc and running the testsuite on s390,
> intel, power for 32/64bit. The __GI_* symbols targets the same functions as
> before.
>
> Okay to commit?

These changes (i.e. patch 1/8) look reasonable to me.  Perhaps wait 
another day if someone else objects.

> ChangeLog:
>
> 	* include/libc-symbols.h (__ifunc): New macro uses gcc attribute ifunc.
> 	(libc_ifunc, libm_ifunc): Use __ifunc as base macro.
> 	(libm_ifunc_init): New define.
> 	* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finite.c:
> 	Redirect ifunced function in header and create a copy of the prototype
> 	for using as ifunc function. Add appropiate aliases to the real symbol

“appropriate“

>  /* Marker used for indirection function symbols.  */
> -#define libc_ifunc(name, expr)						\
> -  extern void *name##_ifunc (void) __asm__ (#name);			\
> -  void *name##_ifunc (void)						\
> +#define __ifunc(name, expr, arg, init)					\
> +  extern __typeof (name) name __attribute__ ((ifunc(#name "_ifunc")));	\

Space after ifunc.

Thanks,
Florian



More information about the Libc-alpha mailing list