[Bug libc/34396] sparc64-unknown-linux-gnu , Gentoo: >200 test failures, SIGILL in many binaries

adhemerval.zanella at linaro dot org sourceware-bugzilla@sourceware.org
Tue Jul 14 12:08:26 GMT 2026


https://sourceware.org/bugzilla/show_bug.cgi?id=34396

--- Comment #4 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
I figured out the issue and why I could not reproduce it.  It seems I hit a ld
bug that disable IFUNC/multiarch on sparc (libc_cv_ld_gnu_indirect_function=no
-> multi_arch=no), and testing with some old toolchain I have I now see the
problem:

Toolchain       ld version      Configure outcome       This bug
gcc-12  2.38    ifunc OK        multi_arch=yes          reproduces
gcc-13  2.40    ifunc OK        multi_arch=yes          reproduces
gcc-14  2.44    link error      multi_arch=no           hidden
gcc-15  2.46.1  ld SEGFAULT     multi_arch=no           hidden
gcc-16  2.46.0  ld SEGFAULT     multi_arch=no           hidden

The issue after b75ad99d45b (TCB set up before static IFUNC resolvers),    
__libc_setup_tls -> _dl_allocate_tls_init copies the TLS init image with the
IFUNC __mempcpy before ARCH_SETUP_IREL resolves it, so on a multi-arch
sparcv9/sparc64 static build the call jumps through an unrelocated PLT slot and
the process dies with SIGILL.

I will send a fix fo this.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list