aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
authorKaz Kojima <kkojima@rr.iij4u.or.jp>2009-09-15 02:02:48 +0000
committerKaz Kojima <kkojima@rr.iij4u.or.jp>2009-09-15 02:02:48 +0000
commit22fe6da0f9e70167b759d4fe941beb2cf3f7a702 (patch)
tree37bbbb11b9eafc9f6d86d56f058a7daff20ba8f2 /ld/testsuite
parente18b582c971d0bd4de2043deac2703713347c5c5 (diff)
downloadgdb-22fe6da0f9e70167b759d4fe941beb2cf3f7a702.zip
gdb-22fe6da0f9e70167b759d4fe941beb2cf3f7a702.tar.gz
gdb-22fe6da0f9e70167b759d4fe941beb2cf3f7a702.tar.bz2
* ld-elfcomm/elfcomm.exp: Add appropriate emulation option
for sh64*-*-*. * ld-gc/gc.exp (test_gc): Likewise.
Diffstat (limited to 'ld/testsuite')
-rw-r--r--ld/testsuite/ChangeLog6
-rw-r--r--ld/testsuite/ld-elfcomm/elfcomm.exp29
-rw-r--r--ld/testsuite/ld-gc/gc.exp14
3 files changed, 44 insertions, 5 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 1047c10..9a0333d 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2009-09-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * ld-elfcomm/elfcomm.exp: Add appropriate emulation option
+ for sh64*-*-*.
+ * ld-gc/gc.exp (test_gc): Likewise.
+
2009-09-14 H.J. Lu <hongjiu.lu@intel.com>
* ld-undefined/entry-7.d: New.
diff --git a/ld/testsuite/ld-elfcomm/elfcomm.exp b/ld/testsuite/ld-elfcomm/elfcomm.exp
index 18aff55..213a821 100644
--- a/ld/testsuite/ld-elfcomm/elfcomm.exp
+++ b/ld/testsuite/ld-elfcomm/elfcomm.exp
@@ -1,5 +1,6 @@
# Expect script for common symbol tests
-# Copyright 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# Copyright 2003, 2005, 2006, 2007, 2008, 2009
+# Free Software Foundation, Inc.
#
# This file is part of the GNU Binutils.
#
@@ -185,7 +186,18 @@ if { ![ld_compile "$CC $CFLAGS" $srcdir/$subdir/common1a.c tmpdir/common1a.o]
global ld
global link_output
-if { [ld_simple_link $ld tmpdir/common1.o "-r tmpdir/common1a.o tmpdir/common1b.o"] } {
+set options "-r tmpdir/common1a.o tmpdir/common1b.o"
+
+# SH64 targets needs an extra ld option for this test.
+if [istarget sh64*-*-*] {
+ if [istarget sh64*l*-*-*] {
+ set options "-mshlelf32 $options"
+ } else {
+ set options "-mshelf32 $options"
+ }
+}
+
+if { [ld_simple_link $ld tmpdir/common1.o $options] } {
unresolved $test1w1
return
}
@@ -211,7 +223,18 @@ if { [dump_common1 $test1c1] } {
pass $test1c1
}
-if { [ld_simple_link $ld tmpdir/common1.o "-r tmpdir/common1b.o tmpdir/common1a.o"] } {
+set options "-r tmpdir/common1b.o tmpdir/common1a.o"
+
+# SH64 targets needs an extra ld option for this test.
+if [istarget sh64*-*-*] {
+ if [istarget sh64*l*-*-*] {
+ set options "-mshlelf32 $options"
+ } else {
+ set options "-mshelf32 $options"
+ }
+}
+
+if { [ld_simple_link $ld tmpdir/common1.o $options] } {
unresolved $test1w2
return
}
diff --git a/ld/testsuite/ld-gc/gc.exp b/ld/testsuite/ld-gc/gc.exp
index 400e989..648f732 100644
--- a/ld/testsuite/ld-gc/gc.exp
+++ b/ld/testsuite/ld-gc/gc.exp
@@ -1,5 +1,5 @@
# Expect script for ld-gc tests
-# Copyright 2008
+# Copyright 2008, 2009
# Free Software Foundation, Inc.
#
# This file is part of the GNU Binutils.
@@ -44,8 +44,18 @@ proc test_gc { testname filename linker ldflags} {
}
set outfile "tmpdir/$filename"
+ set options "-L$srcdir/$subdir $ldflags $objfile"
- if ![ld_simple_link $linker $outfile "-L$srcdir/$subdir $ldflags $objfile"] {
+ # SH64 targets needs an extra ld option for this test.
+ if [istarget sh64*-*-*] {
+ if [istarget sh64*l*-*-*] {
+ set options "-mshlelf32 $options"
+ } else {
+ set options "-mshelf32 $options"
+ }
+ }
+
+ if ![ld_simple_link $linker $outfile $options] {
fail $testname
return
}