REL vs. RELA: how to choose?

Nick Clifton nickc@redhat.com
Wed Feb 14 18:45:00 GMT 2001


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



More information about the Binutils mailing list