ld/testsuite: exclude relocs from section contributions PDB test
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_binutils_build--master-arm |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 |
success
|
Test passed
|
linaro-tcwg-bot/tcwg_binutils_check--master-arm |
success
|
Test passed
|
Commit Message
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.
---
ld/testsuite/ld-pe/pdb.exp | 22 +---------------------
ld/testsuite/ld-pe/pdb2-section-contrib.d | 4 +---
2 files changed, 2 insertions(+), 24 deletions(-)
Comments
On 09.09.2024 23:05, Mark Harmstone wrote:
> 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.
> ---
> ld/testsuite/ld-pe/pdb.exp | 22 +---------------------
> ld/testsuite/ld-pe/pdb2-section-contrib.d | 4 +---
> 2 files changed, 2 insertions(+), 24 deletions(-)
Okay, and thanks for the quick turnaround.
Jan
@@ -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 ........