aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-ctf/array-int.c
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2025-08-22 11:04:51 +0200
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2025-08-22 11:04:51 +0200
commit858ed9bfe38682274cfa58948c79d4854abd80c4 (patch)
tree0ba7081ee3c8e87aeede20d5ccc854f24054176a /ld/testsuite/ld-ctf/array-int.c
parent80bca2ead66f0c1d6e84b9d0b0ace297fa97d1c7 (diff)
downloadbinutils-858ed9bfe38682274cfa58948c79d4854abd80c4.zip
binutils-858ed9bfe38682274cfa58948c79d4854abd80c4.tar.gz
binutils-858ed9bfe38682274cfa58948c79d4854abd80c4.tar.bz2
ld: testsuite: Only xfail "shared (non PIC)" etc. on 64-bit Solaris
Once the ld-shared tests run on both Solaris/SPARC and x86, two tests XPASS on 32-bit Solaris, both SPARC and x86 (pre-existing on SPARC, newly revealed on x86): XPASS: shared (non PIC) XPASS: shared (PIC main, non PIC so) Consequently, this patch restricts xfailing them to 64-bit Solaris. There now remain 1 (32-bit) or 3 (64-bit) XFAILs. I've checked the reasons and found all comments in shared.exp are wrong: * The common one (SPARC and x86, 32 and 64-bit) is XFAIL: shared (non PIC, load offset) The error is always the same: ld.so.1: shnp: fatal: tmpdir/shnp.so: unknown file type Running shnp under truss reveals 26170: openat(AT_FDCWD, "tmpdir/shnp.so", O_RDONLY) = 3 26170: mmapobj(3, MMOBJ_INTERPRET, 0xFFFFFFFF7F5D0058, 0xFFFFFFFF7FFFE8A0, 0x00000000) Err#48 ENOTSUP which can be traced in the mmapobj(2) implementation to the requirement that a shared object's p_vaddr needs to be 0, which in this test is intentionally not the case. * The other two XFAIL's are 64-bit only and for another reason: XFAIL: shared (non PIC) XFAIL: shared (PIC main, non PIC so) On sparcv9, shnp execution fails: ld.so.1: shnp: fatal: relocation error: R_SPARC_H44: file tmpdir/shnp.so: symbol shlibvar2: value 0x3fffffffb9c does not fit On amd64, shmpnp.so fails to link: ld/tmpdir/ld/collect-ld: tmpdir/sh1np.o: relocation R_X86_64_32S against symbol `shlib_shlibvar1' can not be used when making a shared object; recompile with -fPIC ld/tmpdir/ld/collect-ld: failed to set dynamic section sizes: bad value In both cases, this happens with -z text, too, so the comments are bogus. Instead, the issue that the code needs to be PIC. So I'm updating the comments accordingly. Tested on sparc{v9,}-sun-solaris2.11 and {amd64,i386}-pc-solaris2.11. 2025-07-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> ld: * testsuite/ld-shared/shared.exp (shared (non PIC)): Update comment. xfail on 64-bit Solaris only. (shared (PIC main, non PIC so)): Likewise. (shared (non PIC, load offset)): Update comment.
Diffstat (limited to 'ld/testsuite/ld-ctf/array-int.c')
0 files changed, 0 insertions, 0 deletions