This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: arm-elf-as truncates branch offsets w/o warning
- To: binutils at sourceware dot cygnus dot com
- Subject: Re: arm-elf-as truncates branch offsets w/o warning
- From: Grant Edwards <grante at visi dot com>
- Date: Thu, 16 Mar 2000 18:41:43 -0600
- References: <20000316102708.A18044@visi.com> <20000316171956.A5344@visi.com>
> > 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).
Both of these cases are handled correctly if the branch is
relocatable -- when the branch instruction and the destination
are in different sections.
--
Grant Edwards
grante@visi.com