aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-sh/sh64
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-sh/sh64')
-rw-r--r--ld/testsuite/ld-sh/sh64/rd-sh64.exp11
-rw-r--r--ld/testsuite/ld-sh/sh64/stobin-0-dso.d9
-rw-r--r--ld/testsuite/ld-sh/sh64/stobin-1.d15
-rw-r--r--ld/testsuite/ld-sh/sh64/stobin.s5
-rw-r--r--ld/testsuite/ld-sh/sh64/stolib.s7
5 files changed, 47 insertions, 0 deletions
diff --git a/ld/testsuite/ld-sh/sh64/rd-sh64.exp b/ld/testsuite/ld-sh/sh64/rd-sh64.exp
index cc5c3f7..6efb347 100644
--- a/ld/testsuite/ld-sh/sh64/rd-sh64.exp
+++ b/ld/testsuite/ld-sh/sh64/rd-sh64.exp
@@ -27,4 +27,15 @@ foreach sh64test $rd_test_list {
# We need to strip the ".d", but can leave the dirname.
verbose [file rootname $sh64test]
run_dump_test [file rootname $sh64test]
+ if [string match $srcdir/$subdir/*-dso.d $sh64test] {
+ # Copy the output of the DSO-createing test to .so file.
+ # Notice that a DSO-creating test must preceed the tests
+ # which need that DSO in sort-order by name.
+ set cmd "cp tmpdir/dump \
+ tmpdir/[file rootname [file tail $sh64test]].so"
+ send_log "$cmd\n"
+ set cmdret [catch "exec $cmd" comp_output]
+ send_log "$comp_output\n"
+ # FIXME: What if it fails? Need we do something?
+ }
}
diff --git a/ld/testsuite/ld-sh/sh64/stobin-0-dso.d b/ld/testsuite/ld-sh/sh64/stobin-0-dso.d
new file mode 100644
index 0000000..405c05a
--- /dev/null
+++ b/ld/testsuite/ld-sh/sh64/stobin-0-dso.d
@@ -0,0 +1,9 @@
+#source: stolib.s
+#as: --abi=32 --isa=SHmedia
+#ld: -shared -mshelf32
+#objdump: -drj.text
+#target: sh64-*-elf
+
+.*: +file format elf32-sh64.*
+
+#pass
diff --git a/ld/testsuite/ld-sh/sh64/stobin-1.d b/ld/testsuite/ld-sh/sh64/stobin-1.d
new file mode 100644
index 0000000..e0f8b27
--- /dev/null
+++ b/ld/testsuite/ld-sh/sh64/stobin-1.d
@@ -0,0 +1,15 @@
+#source: stobin.s
+#as: --abi=32 --isa=SHmedia
+#ld: -mshelf32 tmpdir/stobin-0-dso.so
+#objdump: -drj.text
+#target: sh64-*-elf
+
+.*: +file format elf32-sh64.*
+
+Disassembly of section \.text:
+
+0+[0-9a-f]+ <start>:
+ [0-9a-f]+: cffffd90 movi -1,r25
+ [0-9a-f]+: cbfee590 shori 65465,r25 ! 0xffffffb9 .*
+ [0-9a-f]+: 6bf56600 ptrel/l r25,tr0
+ [0-9a-f]+: 4401fff0 blink tr0,r63
diff --git a/ld/testsuite/ld-sh/sh64/stobin.s b/ld/testsuite/ld-sh/sh64/stobin.s
new file mode 100644
index 0000000..30d3597
--- /dev/null
+++ b/ld/testsuite/ld-sh/sh64/stobin.s
@@ -0,0 +1,5 @@
+ .text
+ .globl start
+start:
+ pt bar, tr0
+ blink tr0, r63
diff --git a/ld/testsuite/ld-sh/sh64/stolib.s b/ld/testsuite/ld-sh/sh64/stolib.s
new file mode 100644
index 0000000..587faa6
--- /dev/null
+++ b/ld/testsuite/ld-sh/sh64/stolib.s
@@ -0,0 +1,7 @@
+ .text
+ .globl bar
+ .type bar,@function
+bar:
+ ptabs r18, tr0
+ blink tr0, r63
+ .Lfe_bar: .size bar,.Lfe_bar-X