aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-scripts/weak.exp
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-scripts/weak.exp')
-rw-r--r--ld/testsuite/ld-scripts/weak.exp12
1 files changed, 11 insertions, 1 deletions
diff --git a/ld/testsuite/ld-scripts/weak.exp b/ld/testsuite/ld-scripts/weak.exp
index 925c812..9ea9ff6 100644
--- a/ld/testsuite/ld-scripts/weak.exp
+++ b/ld/testsuite/ld-scripts/weak.exp
@@ -1,6 +1,6 @@
# Test weak symbols.
# By Ian Lance Taylor, Cygnus Solutions.
-# Copyright 1999, 2000, 2002, 2004
+# Copyright 1999, 2000, 2002, 2004, 2006
# Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
@@ -29,6 +29,7 @@ if {! [is_elf_format] && ! [is_pecoff_format]} {
# Weak symbols are broken for non-i386 PE targets.
if {! [istarget i?86-*-*]} {
setup_xfail *-*-pe*
+ setup_xfail *-*-mingw64*
}
# hppa64 and or32 are incredibly broken
@@ -41,6 +42,12 @@ if {! [ld_assemble $as $srcdir/$subdir/weak1.s tmpdir/weak1.o]
return
}
+global LDFLAGS
+set saved_LDFLAGS "$LDFLAGS"
+if [istarget "*-*-mingw64*"] then {
+ set LDFLAGS "$LDFLAGS --image-base 0"
+}
+
set weak_regexp_big \
".*Contents of section .text:.*1000 00001008 0000200c 12121212 34343434.*Contents of section .data:.*2000 00001008 0000200c 56565656 78787878.*"
@@ -52,6 +59,7 @@ if {! [ld_simple_link $ld tmpdir/weak "$flags -T $srcdir/$subdir/weak.t tmpdir/w
} else {
if {[which $objdump] == 0} then {
unresolved $testname
+ set LDFLAGS "$saved_LDFLAGS"
return
}
@@ -67,3 +75,5 @@ if {! [ld_simple_link $ld tmpdir/weak "$flags -T $srcdir/$subdir/weak.t tmpdir/w
fail $testname
}
}
+
+set LDFLAGS "$saved_LDFLAGS"