diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2025-08-18 16:00:42 +0200 |
---|---|---|
committer | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2025-08-18 16:00:42 +0200 |
commit | fc6423d965d5aa406ba64a18f3a45b5c53864d9f (patch) | |
tree | 908546b6765db8819831918564dd8f37b69a77ee /gdb/python | |
parent | 9e5fdac9ac81c8bc383f4314388c2c830f1e575c (diff) | |
download | binutils-fc6423d965d5aa406ba64a18f3a45b5c53864d9f.zip binutils-fc6423d965d5aa406ba64a18f3a45b5c53864d9f.tar.gz binutils-fc6423d965d5aa406ba64a18f3a45b5c53864d9f.tar.bz2 |
ld: testsuite: Fix no-plt tests on Solaris/i386
Several no-plt tests FAIL on 32-bit Solaris/x86:
FAIL: Build libno-plt-1b.so
FAIL: No PLT (dynamic 1a)
FAIL: No PLT (dynamic 1b)
FAIL: No PLT (dynamic 1c)
FAIL: No PLT (PIE 1e)
FAIL: No PLT (PIE 1f)
FAIL: No PLT (PIE 1g)
The failure mode is always similar, e.g.
../binutils/objdump -dwrj.text tmpdir/libno-plt-1b.so > dump.out
regexp_diff match failure
regexp "^ +[a-f0-9]+: 8b 80 ([0-9a-f]{2} ){4}[ ]+mov +-0x[a-f0-9]+\(%eax\),%eax$"
line " 4aa: 8b 80 14 00 00 00 mov 0x14(%eax),%eax"
regexp_diff match failure
regexp "^ +[a-f0-9]+: ff a0 ([0-9a-f]{2} ){4}[ ]+jmp +\*-0x[0-9a-f]+\(%eax\)$"
line " 4ca: ff a0 14 00 00 00 jmp *0x14(%eax)"
i.e. there's a positive offset from the GOT instead of the expected
negative one. AFAICS that's because there are additional GOT entries on
the Solaris side (printed with elfdump -G since there seems to be no
support for that in either readelf or objdump):
* Solaris/i386:
Global Offset Table Section: .got
index addr value pending relocation
[0] 0x15f4 0x1514
[1] 0x15f8 0
[2] 0x15fc 0
[3] 0x1600 0x3a6 R_386_JMP_SLOT __cxa_finalize
[4] 0x1604 0 R_386_GLOB_DAT _ITM_deregisterTMCloneTable
[5] 0x1608 0 R_386_GLOB_DAT func
* Linux/i686:
Global Offset Table Section: .got
index addr value pending relocation
[0] 0x3fe0 0 R_386_GLOB_DAT _ITM_deregisterTMCloneTable
[1] 0x3fe4 0 R_386_GLOB_DAT __cxa_finalize
[2] 0x3fe8 0 R_386_GLOB_DAT __gmon_start__
[3] 0x3fec 0 R_386_GLOB_DAT func
This patch fixes this by making the sign optional in affected cases.
Tested on i386-pc-solaris2.11 and i686-pc-linux-gnu.
2025-07-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
ld:
* testsuite/ld-i386/libno-plt-1b.dd: Allow for positive GOT
offsets.
* testsuite/ld-i386/no-plt-1a.dd: Likewise.
* testsuite/ld-i386/no-plt-1b.dd: Likewise.
* testsuite/ld-i386/no-plt-1c.dd: Likewise.
* testsuite/ld-i386/no-plt-1e.dd: Likewise.
* testsuite/ld-i386/no-plt-1f.dd: Likewise.
* testsuite/ld-i386/no-plt-1g.dd: Likewise.
Diffstat (limited to 'gdb/python')
0 files changed, 0 insertions, 0 deletions