aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/python.c
diff options
context:
space:
mode:
authorJens Remus <jremus@linux.ibm.com>2026-03-25 11:14:58 +0100
committerJens Remus <jremus@linux.ibm.com>2026-03-25 11:14:58 +0100
commit4054f280399225fc40ac42423246ac9c5de6f857 (patch)
tree6c2a7d97c357640aa4272efb6f5304f903521155 /gdb/python/python.c
parent7e9614552f205e417366357562afbd21b8d07c29 (diff)
downloadbinutils-4054f280399225fc40ac42423246ac9c5de6f857.tar.gz
binutils-4054f280399225fc40ac42423246ac9c5de6f857.tar.bz2
binutils-4054f280399225fc40ac42423246ac9c5de6f857.zip
s390: Skip non-PIC shared library visibility linker tests
Some of the "visibility" linker tests that use a non-PIC shared library with load offset (first load segment has a non-zero virtual address) XPASS on s390 64-bit (s390x): PASS: visibility (hidden) (non PIC, load offset) XFAIL: visibility (hidden_normal) (non PIC, load offset) PASS: visibility (hidden_undef) (non PIC, load offset) PASS: visibility (hidden_undef_def) (non PIC, load offset) XPASS: visibility (hidden_weak) (non PIC, load offset) XPASS: visibility (protected) (non PIC, load offset) PASS: visibility (protected_undef) (non PIC, load offset) XPASS: visibility (protected_undef_def) (non PIC, load offset) XPASS: visibility (protected_weak) (non PIC, load offset) XFAIL: visibility (normal) (non PIC, load offset) This is due to Alan Modra's commit 125c64931b97 from 2006, which moved overriddenvar, shlib_overriddencall2, and shared_data from sh1.c to sh2.c, if the shared library is build non-PIC. This prevents GCC from treating them as local symbols, preventing the executable from overriding them, causing the tests to fail because interposition did not work. This actually only became visible due to H.J. Lu's commit fd7728c8a4aa ("ld: Update function prototypes for compilers defaulting to -std=gnu23") from 2025, that fixed the visibility test's function prototypes. Previously all of the "visibility" tests would appear as UNSUPPORTED, as the prerequisite compile of main.c would fail due to the function prototypes not matching with their definitions. In general creating shared libraries from non-PIC compiled code is not supported on s390 64-bit (s390x). This is because shared libraries are inherently position independent. The Glibc dynamic loader common code passes the virtual address from the first load segment as hint to mmap(). As a result a shared library with "load offset" may be loaded at the virtual address used at link-time, but this is not guaranteed. The following visibility tests using a non-PIC shared library with load offset XPASS, if the non-PIC shared library is loaded at its link- time "load offset". This causes the tests to PASS by chance. XPASS: visibility (hidden_weak) (non PIC, load offset) XPASS: visibility (protected) (non PIC, load offset) XPASS: visibility (protected_undef_def) (non PIC, load offset) XPASS: visibility (protected_weak) (non PIC, load offset) The following visibility tests using a non-PIC shared library with load offset still XFAIL: XFAIL: visibility (hidden_normal) (non PIC, load offset) XFAIL: visibility (normal) (non PIC, load offset) This is because visibility_var is local in sh1.c, preventing the executable from overriding it, causing the tests to fail because interposition does not work. Note that all of the visibility tests using a non-PIC shared library without load offset XFAIL, as they are loaded at a random address, which is incompatible with non-PIC code. Skip all non-PIC shared library "visibility" linker tests on s390 64-bit (s390x) as unsupported. In contrast to PowerPC and MIPS do not skip all of the "visibility" linker tests. ld/testsuite/ * ld-vsb/vsb.exp: Skip non-PIC shared library "visibility" tests on s390 64-bit (s390x). Signed-off-by: Jens Remus <jremus@linux.ibm.com>
Diffstat (limited to 'gdb/python/python.c')
0 files changed, 0 insertions, 0 deletions