This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GAS (ARM): Possible bug in relative/relocatable address detection


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]