This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: GAS (ARM): Possible bug in relative/relocatable address detection
- From: Alan Modra <amodra at gmail dot com>
- To: Jens Bauer <jens-lists at gpio dot dk>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Tue, 28 May 2013 09:53:42 +0930
- Subject: Re: GAS (ARM): Possible bug in relative/relocatable address detection
- References: <20130528004017761596 dot 7c67cd64 at gpio dot dk>
On Tue, May 28, 2013 at 12:40:17AM +0200, Jens Bauer wrote:
> ...But if I add (... | 0), the generated table appears to be correct.
That is likely a bug. You probably ought to be getting an error.
I suspect you are trying to subtract two symbols defined in different
sections. That generally isn't allowed because sections don't have a
fixed relation to each other at assembly time, and ELF relocations
normally only specify one symbol. In your case it looks like the
subtrahend symbol is defined in the same section as the expression,
gas converts the subtrahend to a pc-relative value (in order to reduce
the number of symbols to one), but ARM doesn't support a 16-bit
pc-relative relocation.
--
Alan Modra
Australia Development Lab, IBM