mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 18:14:13 +08:00
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.
This commit is contained in:
parent
80b48e0afd
commit
8e98b4aa43
@ -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
|
||||
}
|
||||
|
@ -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 ........
|
||||
|
Loading…
Reference in New Issue
Block a user