This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: REL vs. RELA: how to choose?
- To: raydonnelly at chorltonhome dot freeserve dot co dot uk
- Subject: Re: REL vs. RELA: how to choose?
- From: Nick Clifton <nickc at redhat dot com>
- Date: Wed, 14 Feb 2001 18:45:15 -0800
- CC: binutils at sources dot redhat dot com
Hi Ray,
: Aren't addends stored with the rightshift shifted off them?
Not normally, no.
: I mean, what's the point in having a rela relocation record for an
: insn that can't hold the total offset as there isn't space in the
: bitfield?
The reason is that the addend in the reloc is not just stuffed into
the instruction. Arithmetic and other processing is performed on it
first and then the result is stuffed into the instruction. If the
addend were pre-shifted by the assembler when creating the reloc, then
correct arithmetic could not performed on it.
Cheers
Nick