* 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-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
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. */
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;
+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
--- /dev/null
+
+tmpdir/i135409-5.x: file format elf32-.*
+
+Disassembly of section .text:
+
+0+0700 <_start>:
+ 700:[ ]+cc 00 f9[ ]+jmp[ ]+0 \<L001\>
--- /dev/null
+ .text
+ .global _start
+_start:
+ jmp L001
+
+ .section .text1
+L001:
+ nop
--- /dev/null
+SECTIONS
+{
+ . = 0x0;
+ .text1 :
+ {
+ *(.text1)
+ }
+
+ . = 0x700;
+ .text :
+ {
+ *(.text)
+ }
+ . = 0x8100;
+ .bss :
+ {
+ *(.bss)
+ }
+ .data :
+ {
+ *(.data)
+ }
+}
"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