arm-elf-as truncates branch offsets w/o warning
Scott Bambrough
scottb@netwinder.org
Thu Mar 16 15:23:00 GMT 2000
Hi Grant,
Would you have a testcase for this as well?
Scott
Grant Edwards wrote:
>
> > I just noticed that a recent snapshot (000309) of the ARM
> > assembler truncates branch offsets without warning. I haven't
> > had a chance yet to take look at the ARM assembler source.
>
> There are two different (but related) problems:
>
> 1) Legal, non-relocatible branch destinations >= 0x0400,00000
> are not handled correctly and bad code is generated with
> no error or warning messages.
>
> 2) Illegal branches to non-relocatible branch destinations
> with offsets >= +/- 0x0200,00000 aren't detected and bad
> code is generated (also silently).
>
> So far I've had a look at #1. I can't see a way to fix it
> easily, but I've attached a patch to gas/config/tc-arm.c that
> will generate an error when a non-relocatible branch destination
> is too large for gas to deal with.
>
> I'll work on #2 next.
>
> --
> Grant Edwards
> grante@visi.com
>
> --------------------------------------------------------------------------------
>
> gas-tc-arm.patchName: gas-tc-arm.patch
> Type: Plain Text (text/plain)
--
Scott Bambrough - Software Engineer
REBEL.COM http://www.rebel.com
NetWinder http://www.netwinder.org
More information about the Binutils
mailing list