GAS (ARM): Possible bug in relative/relocatable address detection
Alan Modra
amodra@gmail.com
Tue May 28 00:23:00 GMT 2013
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
More information about the Binutils
mailing list