diff options
author | Kaz Kojima <kkojima@rr.iij4u.or.jp> | 2003-10-15 06:23:55 +0000 |
---|---|---|
committer | Kaz Kojima <kkojima@rr.iij4u.or.jp> | 2003-10-15 06:23:55 +0000 |
commit | 9baa793ea0836e3b435be03276a0c60b790d0037 (patch) | |
tree | 62df2af562b4bbdc5f534e1e7deb7d875c641c02 /ld/testsuite/ld-sh | |
parent | a681638b3a35a457f4d710d395a5bfed6df84f38 (diff) | |
download | binutils-redhat-9baa793ea0836e3b435be03276a0c60b790d0037.tar.gz |
[bfd]
* elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
relocations.
(sh_elf_check_relocs): Likewise.
* elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
(sh64_elf_merge_symbol_attribute): New.
* elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
(sh64_elf64_merge_symbol_attribute): New.
[ld/testsuite]
* ld-sh/sh64/rd-sh64.exp: If the test matches *-dso.d, copy
the output of linker to the file tmpdir/*-dso.so.
* ld-sh/sh64/stobin-0-dso.d: New.
* ld-sh/sh64/stobin-1.d: New.
* ld-sh/sh64/stobin.s: New.
* ld-sh/sh64/stolib.s: New.
Diffstat (limited to 'ld/testsuite/ld-sh')
-rw-r--r-- | ld/testsuite/ld-sh/sh64/rd-sh64.exp | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-sh/sh64/stobin-0-dso.d | 9 | ||||
-rw-r--r-- | ld/testsuite/ld-sh/sh64/stobin-1.d | 15 | ||||
-rw-r--r-- | ld/testsuite/ld-sh/sh64/stobin.s | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-sh/sh64/stolib.s | 7 |
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 cc5c3f7968..6efb3472d6 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 0000000000..405c05a72f --- /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 0000000000..e0f8b27dfa --- /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 0000000000..30d3597b54 --- /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 0000000000..587faa6d16 --- /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 |