This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On 08/08/2016 06:08 PM, Paul E. Murphy wrote:


On 08/08/2016 09:38 AM, Stefan Liebler wrote:
This patch adds a configure check to test if gcc supports attribute ifunc.
The support can either be enabled in <gcc-src>/gcc/config.gcc for one
architecture in general by setting default_gnu_indirect_function variable to yes
or by configuring gcc with --enable-gnu-indirect-function.

The next patch rewrites libc_ifunc macro to use gcc attribute ifunc instead
of inline assembly to generate the IFUNC symbols due to false debuginfo.

If gcc does not support attribute ifunc and glibc is configured with
--enable-multi-arch then configure will abort with an error message.
If --enable-multi-arch is not given then configure will silently
disable multi-arch support.

ChangeLog:

	* configure.ac: Add check if gcc supports attribute ifunc feature.
	* configure: Regenerated.


One more hiccup after trying out this patch.  pt-vfork.c mandates ifunc
on most (all?) targets using nptl.  It seems configure needs to mandate
this support on any target using nptl.


According to the comment in nptl/pt-vfork.c:
/* Note! If the architecture doesn't support IFUNC, then we need an
   alternate target-specific mechanism to implement this.  So we just
   assume IFUNC here and require that the target override this file
   if necessary.

   If the architecture can assume all supported versions of gcc will
   produce a tail-call to __libc_vfork, consider including the version
   in sysdeps/unix/sysv/linux/aarch64/pt-vfork.c.  */


The following targets have an own version of pt-vfork.[cS]:
./sysdeps/unix/sysv/linux/sh/pt-vfork.S
./sysdeps/unix/sysv/linux/hppa/pt-vfork.S
./sysdeps/unix/sysv/linux/microblaze/pt-vfork.S
./sysdeps/unix/sysv/linux/ia64/pt-vfork.S
./sysdeps/unix/sysv/linux/aarch64/pt-vfork.c
./sysdeps/unix/sysv/linux/tile/pt-vfork.c
./sysdeps/unix/sysv/linux/mips/pt-vfork.S
./sysdeps/unix/sysv/linux/s390/pt-vfork.S
./sysdeps/unix/sysv/linux/sparc/pt-vfork.S
./sysdeps/unix/sysv/linux/m68k/pt-vfork.c
./sysdeps/unix/sysv/linux/alpha/pt-vfork.S


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]