diff options
author | Nick Clifton <nickc@redhat.com> | 2006-09-20 11:35:11 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2006-09-20 11:35:11 +0000 |
commit | 99ad839030c1177eb409a99320fa7e60226f0db3 (patch) | |
tree | 31841958e04c69ceb1aeafcf7cdef5e721d23829 /ld/testsuite/ld-scripts | |
parent | a8bbe5b03e6b16a41a69e570061e34014d30431a (diff) | |
download | gdb-99ad839030c1177eb409a99320fa7e60226f0db3.zip gdb-99ad839030c1177eb409a99320fa7e60226f0db3.tar.gz gdb-99ad839030c1177eb409a99320fa7e60226f0db3.tar.bz2 |
Add x86_64-mingw64 target
Diffstat (limited to 'ld/testsuite/ld-scripts')
-rw-r--r-- | ld/testsuite/ld-scripts/align.exp | 16 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/align2a.d | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/defined.exp | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/provide.exp | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/script.exp | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/weak.exp | 12 |
6 files changed, 47 insertions, 16 deletions
diff --git a/ld/testsuite/ld-scripts/align.exp b/ld/testsuite/ld-scripts/align.exp index 43369d0..25d4d3e 100644 --- a/ld/testsuite/ld-scripts/align.exp +++ b/ld/testsuite/ld-scripts/align.exp @@ -1,6 +1,6 @@ # Test ALIGN in a linker script. # By Nathan Sidwell, CodeSourcery LLC -# Copyright 2004, 2005 +# Copyright 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify @@ -29,13 +29,20 @@ if ![ld_assemble $as $srcdir/$subdir/align.s tmpdir/align.o] { return } -# Doesn't work on PECOFF, appears to be a genuine bug -if [is_pecoff_format] { +# Doesn't work on PECOFF, appears to be a genuine bug. +# mingw64 targets need to set the image base to 0 to avoid auto image-basing. +global LDFLAGS +set saved_LDFLAGS "$LDFLAGS" +if [istarget "*-*-mingw64*"] then { + set LDFLAGS "$LDFLAGS --image-base 0" +} else { + if [is_pecoff_format] { global target_triplet setup_xfail $target_triplet + } } -if ![ld_simple_link $ld tmpdir/align "-T $srcdir/$subdir/align.t tmpdir/align.o"] { +if ![ld_simple_link $ld tmpdir/align "$LDFLAGS -T $srcdir/$subdir/align.t tmpdir/align.o"] { fail $testname } else { pass $testname @@ -50,3 +57,4 @@ if ![is_aout_format] { run_dump_test align2b } run_dump_test align2c +set LDFLAGS "$saved_LDFLAGS" diff --git a/ld/testsuite/ld-scripts/align2a.d b/ld/testsuite/ld-scripts/align2a.d index d45cf0e..96237dd 100644 --- a/ld/testsuite/ld-scripts/align2a.d +++ b/ld/testsuite/ld-scripts/align2a.d @@ -5,8 +5,8 @@ Sections: Idx +Name +Size +VMA +LMA +File +off +Algn - +0 +\.text +[^ ]* +0+ +0+ .* - +CONTENTS, +ALLOC, +LOAD,.* CODE - +1 +\.data +[^ ]* +0+10 +0+10 .* - +CONTENTS, +ALLOC, +LOAD, +DATA +[ ]+0 +\.text +[^ ]* +0+ +0+ .* +[ ]+CONTENTS, +ALLOC, +LOAD,.* CODE +[ ]+1 +\.data +[^ ]* +0+10 +0+10 .* +[ ]+CONTENTS, +ALLOC, +LOAD, +DATA #pass diff --git a/ld/testsuite/ld-scripts/defined.exp b/ld/testsuite/ld-scripts/defined.exp index dff238b..d02b909 100644 --- a/ld/testsuite/ld-scripts/defined.exp +++ b/ld/testsuite/ld-scripts/defined.exp @@ -1,6 +1,6 @@ # Test DEFINED in a linker script. # By Ian Lance Taylor, Cygnus Support. -# Copyright 2001, 2003 +# Copyright 2001, 2003. 2006 # Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify @@ -25,7 +25,13 @@ if ![ld_assemble $as $srcdir/$subdir/defined.s tmpdir/def.o] { return } -if ![ld_simple_link $ld tmpdir/def "-T $srcdir/$subdir/defined.t tmpdir/def.o"] { +global LDFLAGS +set saved_LDFLAGS "$LDFLAGS" +if [istarget "*-*-mingw64*"] then { + set LDFLAGS "$LDFLAGS --image-base 0" +} + +if ![ld_simple_link $ld tmpdir/def "$LDFLAGS -T $srcdir/$subdir/defined.t tmpdir/def.o"] { fail $testname } else { if ![ld_nm $nm "" tmpdir/def] { @@ -57,3 +63,4 @@ if ![ld_simple_link $ld tmpdir/def "-T $srcdir/$subdir/defined.t tmpdir/def.o"] set prms_id 0 run_dump_test "defined2" run_dump_test "defined3" +set LDFLAGS "$saved_LDFLAGS" diff --git a/ld/testsuite/ld-scripts/provide.exp b/ld/testsuite/ld-scripts/provide.exp index 7e2c0e7..7d755a0 100644 --- a/ld/testsuite/ld-scripts/provide.exp +++ b/ld/testsuite/ld-scripts/provide.exp @@ -1,6 +1,6 @@ # Test PROVIDE in a linker script. # By Nathan Sidwell, CodeSourcery LLC -# Copyright 2004 +# Copyright 2004, 2006 # Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify @@ -29,7 +29,15 @@ if {[istarget "rs6000-*-aix*"] || [is_aout_format]} { return } +global LDFLAGS +set saved_LDFLAGS "$LDFLAGS" +if [istarget "*-*-mingw64*"] then { + set LDFLAGS "$LDFLAGS --image-base 0" +} + run_dump_test provide-1 run_dump_test provide-2 setup_xfail *-*-* run_dump_test provide-3 + +set LDFLAGS "$saved_LDFLAGS" diff --git a/ld/testsuite/ld-scripts/script.exp b/ld/testsuite/ld-scripts/script.exp index bf7b1b1..6bb8c9c 100644 --- a/ld/testsuite/ld-scripts/script.exp +++ b/ld/testsuite/ld-scripts/script.exp @@ -1,6 +1,6 @@ # Test basic linker script functionality # By Ian Lance Taylor, Cygnus Support -# Copyright 1999, 2000, 2001, 2002, 2004 +# Copyright 1999, 2000, 2001, 2002, 2004, 2006 # Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify @@ -95,7 +95,7 @@ proc check_script { } { set flags "" if {[istarget "*-*-pe*"] \ || [istarget "*-*-cygwin*"] \ - || [istarget "*-*-mingw32*"] \ + || [istarget "*-*-mingw*"] \ || [istarget "*-*-winnt*"] \ || [istarget "*-*-nt"] \ || [istarget "*-*-interix*"] } then { @@ -123,5 +123,3 @@ if ![ld_simple_link $ld tmpdir/script "$flags -T $srcdir/$subdir/memory.t tmpdir } else { check_script } - - 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" |