[PATCH v2 1/9] Add configure check to test if gcc supports attribute ifunc.

Stefan Liebler stli@linux.vnet.ibm.com
Wed Aug 17 10:37:00 GMT 2016


Hi,

as information: I filed the following bugzilla "Bug 20478 - libc_ifunc 
macro and similar usages leads to false debug-information." 
(https://sourceware.org/bugzilla/show_bug.cgi?id=20478)

How to proceed with this patchset?

My suggestion is to check for gcc-attribute-ifunc support while 
configuring glibc.

If it is available (currently on intel, s390 and on fedora/rhel for 
power and arm) the gcc-attribute-ifunc will be used for ifunc-macros to 
get rid of the false debug-information.

If it is not available the current approach for ifunc-macros will be 
used instead. This way the debug-information is not correct, but it does 
not break current configurations without the gcc-support.
Furthermore the "assembler hacks" for ifunc-handling are not scattered 
in multiple files but are used only indirect via ifunc-macros and can 
simply removed in libc-symbols.h in future.
If glibc is configured with --enable-multi-arch then configure will dump 
a warning that gcc does not support attribute ifunc and it can be 
enabled by configuring gcc with --enable-gnu-indirect-function.

I'll add a note in INSTALL/NEWS file that a gcc with ifunc support is 
recommended for multi-arch glibcs and how it can be enabled.

After the patchset is committed I can write a note to the Distribution 
Maintainers listed in 
https://sourceware.org/glibc/wiki/MAINTAINERS#Distribution_Maintainers 
to enable ifunc in their gccs. Furthermore I can file a bug against gcc 
to enable ifunc support in <gcc-src>/gcc/config.gcc on architectures 
which support ifunc in binutils.


If we have consensus about this approach, I'll prepare/post a further 
version of the patchset.

Bye
Stefan



More information about the Libc-alpha mailing list