This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix Thumb-2 BLX misassembly


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]