aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-scripts
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-03-11 21:40:02 +1030
committerAlan Modra <amodra@gmail.com>2021-03-12 10:41:34 +1030
commit68cb21837f09fd9c12fe4ced7b14f892be929c4f (patch)
tree2aac19510c37a1f4cc14fca7a0be91f2a7091ac8 /ld/testsuite/ld-scripts
parent1e1e17e5e2395bb94a9c0062c1cb991d1eecd04c (diff)
downloadgdb-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-scripts')
-rw-r--r--ld/testsuite/ld-scripts/crossref.exp6
1 files changed, 5 insertions, 1 deletions
diff --git a/ld/testsuite/ld-scripts/crossref.exp b/ld/testsuite/ld-scripts/crossref.exp
index 467b5d5..4eaafcc 100644
--- a/ld/testsuite/ld-scripts/crossref.exp
+++ b/ld/testsuite/ld-scripts/crossref.exp
@@ -76,7 +76,11 @@ set flags [big_or_little_endian]
# arc-elf32 requires the symbol __SDATA_BEGIN__ to always be present.
if [istarget arc*-*-elf32] {
- set flags "$flags --defsym=__SDATA_BEGIN__=0"
+ append flags " --defsym __SDATA_BEGIN__=0"
+}
+
+if [is_pecoff_format] {
+ append flags " --image-base 0"
}
set exec_output [run_host_cmd "$ld" "$flags -o tmpdir/cross1 -T $srcdir/$subdir/cross1.t tmpdir/cross1.o tmpdir/cross2.o"]