aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Harmstone <mark@harmstone.com>2024-09-09 22:01:00 +0100
committerMark Harmstone <mark@harmstone.com>2024-09-11 01:02:44 +0100
commit8e98b4aa43deebf76f4bff2eaac0165ce6eb4c1b (patch)
treeb74c89066bc56bc3f8606b4c1b13dfdd8f253e80
parent80b48e0afd25650a3a1ef36d8c5edd9b6c538f14 (diff)
downloadgdb-8e98b4aa43deebf76f4bff2eaac0165ce6eb4c1b.zip
gdb-8e98b4aa43deebf76f4bff2eaac0165ce6eb4c1b.tar.gz
gdb-8e98b4aa43deebf76f4bff2eaac0165ce6eb4c1b.tar.bz2
ld/testsuite: exclude relocs from section contributions PDB test
A bug in ld meant that we were erroneously generating image relocations for .secrel32 ops, which we then reflected in our PDB section contributions because the linker was adding a .reloc section. This was incidental to what we were testing for, so pass --disable-reloc-section to ld in order to ensure a consistent output.
-rw-r--r--ld/testsuite/ld-pe/pdb.exp22
-rw-r--r--ld/testsuite/ld-pe/pdb2-section-contrib.d4
2 files changed, 2 insertions, 24 deletions
diff --git a/ld/testsuite/ld-pe/pdb.exp b/ld/testsuite/ld-pe/pdb.exp
index 7ca0fb6..b530e0a 100644
--- a/ld/testsuite/ld-pe/pdb.exp
+++ b/ld/testsuite/ld-pe/pdb.exp
@@ -611,26 +611,6 @@ proc test_mod_info { mod_info } {
if { [expr $off % 4] != 0 } {
set off [expr $off + 4 - ($off % 4)]
}
-
- incr off 64
-
- set obj3 [string range $mod_info $off [expr [string first \000 $mod_info $off] - 1]]
- incr off [expr [string length $obj3] + 1]
-
- set ar3 [string range $mod_info $off [expr [string first \000 $mod_info $off] - 1]]
- incr off [expr [string length $ar3] + 1]
-
- if [string equal $obj3 "* Linker *"] {
- pass "Correct name for dummy object file"
- } else {
- fail "Incorrect name for dummy object file"
- }
-
- if [string equal $ar3 ""] {
- pass "Correct archive name for dummy object file"
- } else {
- fail "Incorrect archive name for dummy object file"
- }
}
proc test_section_contrib { section_contrib } {
@@ -677,7 +657,7 @@ proc test2 { } {
return
}
- if ![ld_link $ld "tmpdir/pdb2.exe" "--pdb=tmpdir/pdb2.pdb --gc-sections -e foo tmpdir/pdb2a.o tmpdir/pdb2b.a"] {
+ if ![ld_link $ld "tmpdir/pdb2.exe" "--pdb=tmpdir/pdb2.pdb --gc-sections --disable-reloc-section -e foo tmpdir/pdb2a.o tmpdir/pdb2b.a"] {
unsupported "Create PE image with PDB file"
return
}
diff --git a/ld/testsuite/ld-pe/pdb2-section-contrib.d b/ld/testsuite/ld-pe/pdb2-section-contrib.d
index 5b1df9f..214eb11 100644
--- a/ld/testsuite/ld-pe/pdb2-section-contrib.d
+++ b/ld/testsuite/ld-pe/pdb2-section-contrib.d
@@ -7,6 +7,4 @@ Contents of section .data:
0020 01000000 10000000 10000000 20000060 ............ ..`
0030 01000000 00000000 00000000 02000000 ................
0040 00000000 3d000000 40000040 00000000 ....=...@..@....
- 0050 00000000 00000000 04000000 00000000 ................
- 0060 0c000000 40000042 02000000 00000000 ....@..B........
- 0070 00000000 ....
+ 0050 00000000 00000000 ........