This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Fix Thumb-2 BLX misassembly
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Julian Brown <julian at codesourcery dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 01 May 2009 14:11:03 +0100
- Subject: Re: [PATCH] Fix Thumb-2 BLX misassembly
- References: <20090501113837.1c94cda5@rex.config>
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.