diff options
author | Nick Clifton <nickc@redhat.com> | 2007-11-28 13:04:18 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2007-11-28 13:04:18 +0000 |
commit | e23f1610289a9ba59e77cc214680d38aa7db9e13 (patch) | |
tree | c6b31554551fb99e3c380ef8296b6f48c6616526 /ld/testsuite | |
parent | e842223a72b42cb087d8ba304b7b31f5d2131568 (diff) | |
download | gdb-e23f1610289a9ba59e77cc214680d38aa7db9e13.zip gdb-e23f1610289a9ba59e77cc214680d38aa7db9e13.tar.gz gdb-e23f1610289a9ba59e77cc214680d38aa7db9e13.tar.bz2 |
* elf-m10300.c (mn10300_elf_relax_section): Extend previous fix to cover forward jumps.
* ld-mn10300/i135409-5.s: New test case. Check for relaxation to a 16-bit backward jump instruction.
* ld-mn10300/i135409-5.t: Linker script for the new test.
* ld-mn10300/i135409-5.d: Expected disassembly of new test.
* ld-mn10300/mn10300.exp: Run the new test.
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-mn10300/i135409-5.d | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-mn10300/i135409-5.s | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-mn10300/i135409-5.t | 23 | ||||
-rw-r--r-- | ld/testsuite/ld-mn10300/mn10300.exp | 10 |
5 files changed, 55 insertions, 1 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 7e8719a..fc7671a 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2007-11-28 Nick Clifton <nickc@redhat.com> + + * ld-mn10300/i135409-5.s: New test case. Check for relaxation to + a 16-bit backward jump instruction. + * ld-mn10300/i135409-5.t: Linker script for the new test. + * ld-mn10300/i135409-5.d: Expected disassembly of new test. + * ld-mn10300/mn10300.exp: Run the new test. + 2007-11-21 Nick Clifton <nickc@redhat.com> * ld-mn10300/i135409-4.s: New test case. Check for relaxation to diff --git a/ld/testsuite/ld-mn10300/i135409-5.d b/ld/testsuite/ld-mn10300/i135409-5.d new file mode 100644 index 0000000..dbff701 --- /dev/null +++ b/ld/testsuite/ld-mn10300/i135409-5.d @@ -0,0 +1,7 @@ + +tmpdir/i135409-5.x: file format elf32-.* + +Disassembly of section .text: + +0+0700 <_start>: + 700:[ ]+cc 00 f9[ ]+jmp[ ]+0 \<L001\> diff --git a/ld/testsuite/ld-mn10300/i135409-5.s b/ld/testsuite/ld-mn10300/i135409-5.s new file mode 100644 index 0000000..23897e8 --- /dev/null +++ b/ld/testsuite/ld-mn10300/i135409-5.s @@ -0,0 +1,8 @@ + .text + .global _start +_start: + jmp L001 + + .section .text1 +L001: + nop diff --git a/ld/testsuite/ld-mn10300/i135409-5.t b/ld/testsuite/ld-mn10300/i135409-5.t new file mode 100644 index 0000000..8b42814 --- /dev/null +++ b/ld/testsuite/ld-mn10300/i135409-5.t @@ -0,0 +1,23 @@ +SECTIONS +{ + . = 0x0; + .text1 : + { + *(.text1) + } + + . = 0x700; + .text : + { + *(.text) + } + . = 0x8100; + .bss : + { + *(.bss) + } + .data : + { + *(.data) + } +} diff --git a/ld/testsuite/ld-mn10300/mn10300.exp b/ld/testsuite/ld-mn10300/mn10300.exp index f67881f..edb1470 100644 --- a/ld/testsuite/ld-mn10300/mn10300.exp +++ b/ld/testsuite/ld-mn10300/mn10300.exp @@ -80,13 +80,21 @@ set mn10300_tests { "i135409-3.x" } { - "adjusting a 16 bit branch" + "adjusting a 16-bit forward branch" "-Ti135409-4.t -relax" "" { "i135409-4.s" } { {objdump -d i135409-4.d} } "i135409-4.x" } + { + "adjusting a 16-bit backward branch" + "-Ti135409-5.t -relax" + "" + { "i135409-5.s" } + { {objdump -d i135409-5.d} } + "i135409-5.x" + } } run_ld_link_tests $mn10300_tests |