This is the mail archive of the binutils@sources.redhat.com 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]

Re: REL vs. RELA: how to choose?


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


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