diff options
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/jalr3.dd | 14 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/jalr3.ld | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/mips-elf.exp | 13 |
4 files changed, 38 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index cad469ce70..4e932aac7f 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2013-05-29 Maciej W. Rozycki <macro@codesourcery.com> + + * ld-mips-elf/jalr3.dd: New test. + * ld-mips-elf/jalr3.ld: New test linker script. + * ld-mips-elf/mips-elf.exp: Run the new test. + 2013-05-21 Alan Modra <amodra@gmail.com> PR ld/12982 diff --git a/ld/testsuite/ld-mips-elf/jalr3.dd b/ld/testsuite/ld-mips-elf/jalr3.dd new file mode 100644 index 0000000000..6b6d484120 --- /dev/null +++ b/ld/testsuite/ld-mips-elf/jalr3.dd @@ -0,0 +1,14 @@ +.*: +file format .*mips.* + +Disassembly of section \.text: + +0+000000 <foo>: + 0: 04110003 bal 10 <\$bar> + 4: 00000000 nop + 8: 10000001 b 10 <\$bar> + c: 00000000 nop + +0+000010 <\$bar>: + 10: 03e00008 jr ra + 14: 00000000 nop + \.\.\. diff --git a/ld/testsuite/ld-mips-elf/jalr3.ld b/ld/testsuite/ld-mips-elf/jalr3.ld new file mode 100644 index 0000000000..1b860452d2 --- /dev/null +++ b/ld/testsuite/ld-mips-elf/jalr3.ld @@ -0,0 +1,5 @@ +ENTRY(foo) +SECTIONS +{ + .text : { *(.text) } +} diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp index 97e0c2ce63..e0ddac9edf 100644 --- a/ld/testsuite/ld-mips-elf/mips-elf.exp +++ b/ld/testsuite/ld-mips-elf/mips-elf.exp @@ -734,3 +734,16 @@ foreach { abi } $abis { [list "readelf -s ehdr_start-2.nd"] \ "ehdr_start-2-${abi}"]] } + +# R_MIPS_JALR reloc tests. +set abis [concat o32 [expr {$has_newabi ? "n32 n64" : ""}]] +foreach { abi } $abis { + run_ld_link_tests [list \ + [list \ + "MIPS JALR reloc test ($abi)" \ + "$abi_ldflags($abi) -T jalr3.ld" "" \ + "$abi_asflags($abi)" \ + [list ../../../gas/testsuite/gas/mips/jalr3.s] \ + [list "objdump -d jalr3.dd"] \ + "jalr3-${abi}"]] +} |