This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/8] Use gcc attribute ifunc in libc_ifunc macro instead of inline assembly due to false debuginfo.
- From: Florian Weimer <fweimer at redhat dot com>
- To: Stefan Liebler <stli at linux dot vnet dot ibm dot com>, libc-alpha at sourceware dot org
- Cc: joseph at codesourcery dot com, carlos at redhat dot com, munroesj at linux dot vnet dot ibm dot com
- Date: Mon, 4 Jul 2016 10:31:35 +0200
- Subject: Re: [PATCH 1/8] Use gcc attribute ifunc in libc_ifunc macro instead of inline assembly due to false debuginfo.
- Authentication-results: sourceware.org; auth=none
- References: <1466682952-6301-1-git-send-email-stli@linux.vnet.ibm.com>
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