[PATCH] Fix Thumb-2 BLX misassembly
Richard Earnshaw
rearnsha@arm.com
Fri May 1 13:11:00 GMT 2009
On Fri, 2009-05-01 at 11:38 +0100, Julian Brown wrote:
> Hi,
>
> This patch fixes disassembly of Thumb-2 BLX instructions (to ARM-mode
> code). At present, the low bit is sometimes erroneously set (depending
> on the offsets involved), which creates an undefined instruction.
>
> Tested with cross to arm-linux-gnueabi, with a new test case.
>
> OK to apply?
>
> Thanks,
>
> Julian
>
> ChangeLog
>
> gas/
> * config/tc-arm.c (do_t_blx): Always use BFD_RELOC_THUMB_PCREL_BLX.
> (md_pcrel_from_section): Align address for BLX.
> (tc_gen_reloc): Change BFD_RELOC_THUMB_PCREL_BLX relocations to
> BFD_RELOC_THUMB_PCREL_BRANCH23 for EABI v4+.
>
> ld/testsuite/
> * ld-arm/arm-elf.exp (armeabitests): Add thumb2-bl-blx-interwork
> test.
> * ld-arm/thumb2-bl-blx-interwork.s: New.
> * ld-arm/thumb2-bl-blx-interwork.d: New.
OK.
R.
More information about the Binutils
mailing list