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 /bfd | |
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 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf-m10300.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 8dc7003..e78868e 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2007-11-28 Nick Clifton <nickc@redhat.com> + + * elf-m10300.c (mn10300_elf_relax_section): Extend previous fix to + cover forward jumps. + 2007-11-21 Nick Clifton <nickc@redhat.com> * elf-m10300.c (mn10300_elf_relax_section): Allow for alignment diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c index 2695217..af2fff3 100644 --- a/bfd/elf-m10300.c +++ b/bfd/elf-m10300.c @@ -2736,7 +2736,7 @@ mn10300_elf_relax_section (bfd *abfd, bfd_vma aend = irel->r_offset; aend = BFD_ALIGN (aend, 1 << irel->r_addend); - adj = 2*adj - adj - 1; + adj = 2 * adj - adj - 1; /* Record the biggest adjustmnet. Skip any alignment at the end of our section. */ @@ -2963,7 +2963,7 @@ mn10300_elf_relax_section (bfd *abfd, able to relax. */ /* Account for jumps across alignment boundaries using align_gap_adjustment. */ - if (value < 0x8001 - align_gap_adjustment + if ((bfd_signed_vma) value < 0x8001 - (bfd_signed_vma) align_gap_adjustment && ((bfd_signed_vma) value > -0x8000 + (bfd_signed_vma) align_gap_adjustment)) { unsigned char code; |