diff options
author | Ian Lance Taylor <ian@airs.com> | 1999-09-12 15:59:48 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1999-09-12 15:59:48 +0000 |
commit | 777690b6475bc1c8f4cdb25da500990c92e05b0e (patch) | |
tree | 165e381221688b9d92cedc4adbe589b355c43f39 /ld | |
parent | 1069dd8da73d903c6d53719ae8bdb63c1791a9aa (diff) | |
download | gdb-777690b6475bc1c8f4cdb25da500990c92e05b0e.zip gdb-777690b6475bc1c8f4cdb25da500990c92e05b0e.tar.gz gdb-777690b6475bc1c8f4cdb25da500990c92e05b0e.tar.bz2 |
* ld-scripts/script.exp: Add --image-base 0 for PE targets.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/script.exp | 15 |
2 files changed, 17 insertions, 2 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 0bf1f59..9bb2008 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,7 @@ +1999-09-12 Ian Lance Taylor <ian@zembu.com> + + * ld-scripts/script.exp: Add --image-base 0 for PE targets. + 1999-08-17 H.J. Lu <hjl@gnu.org> * ld-cdtest/cdtest-foo.cc (Foo::init_foo): Use "%ld" for sizeof. diff --git a/ld/testsuite/ld-scripts/script.exp b/ld/testsuite/ld-scripts/script.exp index fe0a041..9b66174 100644 --- a/ld/testsuite/ld-scripts/script.exp +++ b/ld/testsuite/ld-scripts/script.exp @@ -49,7 +49,18 @@ proc check_script { } { } } -if ![ld_simple_link $ld tmpdir/script "-T $srcdir/$subdir/script.t tmpdir/script.o"] { +# PE targets need to set the image base to 0 to avoid complications from nm. +set flags "" +if {[istarget "*-*-pe*"] \ + || [istarget "*-*-cygwin*"] \ + || [istarget "*-*-mingw32*"] \ + || [istarget "*-*-winnt*"] \ + || [istarget "*-*-nt*"] \ + || [istarget "*-*-interix*"] } then { + set flags "--image-base 0" +} + +if ![ld_simple_link $ld tmpdir/script "$flags -T $srcdir/$subdir/script.t tmpdir/script.o"] { fail $testname } else { check_script @@ -57,7 +68,7 @@ if ![ld_simple_link $ld tmpdir/script "-T $srcdir/$subdir/script.t tmpdir/script set testname "MRI script" -if ![ld_simple_link $ld tmpdir/script "-c $srcdir/$subdir/scriptm.t"] { +if ![ld_simple_link $ld tmpdir/script "$flags -c $srcdir/$subdir/scriptm.t"] { fail $testname } else { check_script |