summaryrefslogtreecommitdiffstats
path: root/ld/testsuite/ld-sh
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-05-28 10:55:23 +0000
committerNick Clifton <nickc@redhat.com>2001-05-28 10:55:23 +0000
commit1e329ce6ace8ea24ba9a160fa16055d29c65d497 (patch)
tree8b8dc7923efa588cb87cea4b64ba734f790f96b5 /ld/testsuite/ld-sh
parentf7a74f8c822e6491d8b79f73ed4de1beda16f255 (diff)
downloadppe42-binutils-1e329ce6ace8ea24ba9a160fa16055d29c65d497.tar.gz
ppe42-binutils-1e329ce6ace8ea24ba9a160fa16055d29c65d497.zip
For sh-*-linux-gnu target add a start address for the text section.
Diffstat (limited to 'ld/testsuite/ld-sh')
-rw-r--r--ld/testsuite/ld-sh/sh.exp9
1 files changed, 8 insertions, 1 deletions
diff --git a/ld/testsuite/ld-sh/sh.exp b/ld/testsuite/ld-sh/sh.exp
index 41ca8095ed..437f7ce588 100644
--- a/ld/testsuite/ld-sh/sh.exp
+++ b/ld/testsuite/ld-sh/sh.exp
@@ -56,7 +56,14 @@ if ![ld_assemble $as "-relax $srcdir/$subdir/sh1.s" tmpdir/sh1.o] {
set testsrec "SH relaxing to S-records"
-if ![ld_simple_link $ld tmpdir/sh1.s1 "-relax --oformat srec tmpdir/sh1.o"] {
+if [istarget sh*-linux-gnu] {
+ # This target needs the explicit entry address.
+ catch "exec $objdump -x tmpdir/sh1 | grep start\\ address | sed s/start\\ address//" entry_addr
+ set srec_relax_arg "-Ttext $entry_addr -relax --oformat srec tmpdir/sh1.o"
+} else {
+ set srec_relax_arg "-relax --oformat srec tmpdir/sh1.o"
+}
+if ![ld_simple_link $ld tmpdir/sh1.s1 $srec_relax_arg ] {
fail $testsrec
} else {
# The file name is embedded in the S-records, so create both
OpenPOWER on IntegriCloud