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

--- Comment #26 from Jens Remus <jremus at linux dot ibm.com> ---
I took a stab at Andreas' GNU linker patch from comment #16.  While it fixes
the issue demonstrated by Rui in comment #14 it causes some of the linker
shared and visibility tests to fail:

Running /home/jremus/binutils/ld/testsuite/ld-shared/shared.exp ...
FAIL: shared
...
Running /home/jremus/binutils/ld/testsuite/ld-vsb/vsb.exp ...
FAIL: visibility (hidden_normal)
FAIL: visibility (hidden_weak)
FAIL: visibility (protected)
FAIL: visibility (protected_undef_def)
FAIL: visibility (protected_weak)
FAIL: visibility (normal)

Note that those tests only fail on distributions that do not configure GCC with
--enable-default-pie.  I have some patches in my queue to compile those and
others with $NOPIE_CFLAGS and link them with $NOPIE_LDFLAGS.

Further investigation shows the test failures are triggered by GCC 12-14
unconditionally emitting the larl address taking instruction with suffix @PLT
since since GCC commit 0990d93dd8a4 ("IBM Z: Use @PLT symbols for local
functions in 64-bit mode").  This would get resolved by Ilya's GCC patch
committed to mainline for GCC 15 with GCC commit a2e0a30c52fa ("IBM zSystems:
Do not use @PLT with larl").

To resolve this for GCC 12-14 I am working on a GNU linker patch to treat
PLT32DBL relocations for address taking instruction "larl rX,<sym>@PLT" as if
it was without @PLT and thus PC32DBL and require function pointer equality. 
Early testing looks promising.

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

Reply via email to