]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - ld/testsuite/ld-scripts/map-address.exp
ld: adjust ld-scripts/map-address.*
[thirdparty/binutils-gdb.git] / ld / testsuite / ld-scripts / map-address.exp
index 9e6f2dc3df3b8d2e1aaa15cfa255b6e1bd8954c1..0f9ac1cf4e646fe2659d8b7f6b547f7cfdb9d83c 100644 (file)
@@ -26,9 +26,15 @@ if {![ld_assemble $as $srcdir/$subdir/sizeof.s tmpdir/map-address.o]} {
     return
 }
 
+if { [is_pecoff_format] } then {
+    set IMAGE_BASE "--image-base 0"
+} else {
+    set IMAGE_BASE ""
+}
+
 if {![ld_link $ld tmpdir/map-address \
         "$LDFLAGS -T $srcdir/$subdir/map-address.t \
-         tmpdir/map-address.o \
+         $IMAGE_BASE tmpdir/map-address.o \
          -Map tmpdir/map-address.map"]} {
     fail $testname
     return
@@ -51,7 +57,7 @@ set testname "map to directory"
 
 if {![ld_link $ld tmpdir/map-address \
         "$LDFLAGS -T $srcdir/$subdir/map-address.t \
-         tmpdir/map-address.o \
+         $IMAGE_BASE tmpdir/map-address.o \
          -Map tmpdir --output fred"]} {
     fail $testname
     return
@@ -74,7 +80,7 @@ set testname "map to % directory"
 
 if {![ld_link $ld tmpdir/map-address \
         "$LDFLAGS -T $srcdir/$subdir/map-address.t \
-         tmpdir/map-address.o \
+         $IMAGE_BASE tmpdir/map-address.o \
          -Map=tmpdir/% --output fred"]} {
     fail $testname
     return
@@ -97,7 +103,7 @@ set testname "map to %.foo directory"
 
 if {![ld_link $ld tmpdir/map-address \
         "$LDFLAGS -T $srcdir/$subdir/map-address.t \
-         tmpdir/map-address.o \
+         $IMAGE_BASE tmpdir/map-address.o \
          -Map=tmpdir/%.foo --output fred"]} {
     fail $testname
     return