diff options
author | Alan Modra <amodra@gmail.com> | 2021-03-11 21:40:02 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-03-12 10:41:34 +1030 |
commit | 68cb21837f09fd9c12fe4ced7b14f892be929c4f (patch) | |
tree | 2aac19510c37a1f4cc14fca7a0be91f2a7091ac8 /ld/testsuite/ld-srec | |
parent | 1e1e17e5e2395bb94a9c0062c1cb991d1eecd04c (diff) | |
download | gdb-68cb21837f09fd9c12fe4ced7b14f892be929c4f.zip gdb-68cb21837f09fd9c12fe4ced7b14f892be929c4f.tar.gz gdb-68cb21837f09fd9c12fe4ced7b14f892be929c4f.tar.bz2 |
PE image base fallout
Fixes x86_64-w64-mingw32 tests that failed with the recent diagnosis
for out of range RVA, and a couple of other gc-sections tests that failed
for other reasons.
* testsuite/ld-gc/gc.exp: Pass "-image-base 0" to ld for PE, and
arrange to define __main for some run_dump_test tests.
* testsuite/ld-gc/pr13683.d: Accept more symbols.
* testsuite/ld-gc/pr14265.d: Likewise, and ordering.
* testsuite/ld-scripts/crossref.exp: Pass "-image-base 0" to ld for PE.
* testsuite/ld-srec/srec.exp: Likewise.
* testsuite/lib/ld-lib.exp (ld_link_defsyms): Use is_pecoff_format.
Diffstat (limited to 'ld/testsuite/ld-srec')
-rw-r--r-- | ld/testsuite/ld-srec/srec.exp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ld/testsuite/ld-srec/srec.exp b/ld/testsuite/ld-srec/srec.exp index e3e4b98..c8d561b 100644 --- a/ld/testsuite/ld-srec/srec.exp +++ b/ld/testsuite/ld-srec/srec.exp @@ -238,7 +238,10 @@ proc run_srec_test { test objs } { # poorly with a.out. if { $sizeof_headers } { - set flags "$flags -Ttext 0x1000" + append flags " -Ttext 0x1000" + if [is_pecoff_format] { + append flags " --image-base 0" + } } # ARM targets cannot convert format in the linker @@ -295,12 +298,12 @@ proc run_srec_test { test objs } { # Xtensa ELF targets relax by default; S-Record linker does not if [istarget xtensa*-*-*] { - set flags "$flags -no-relax" + append flags " -no-relax" } # PRU ELF target relaxes by default; S-Record linker does not if [istarget pru*-*-*] { - set flags "$flags -no-relax" + append flags " -no-relax" } if { ![ld_link $ld tmpdir/sr1 "$flags $objs"] \ |