SHT_RELA sections produced by gas: addend badly specified?
Ian Lance Taylor
ian@airs.com
Wed Aug 27 16:36:00 GMT 2003
Cédric Hombourger <chombourger@nexwave-solutions.com> writes:
> I have noticed that the addend of relocation records of object files
> produced by gas
> (at least for the sh-linux-elf target) are specified in the
> relocatable field rather than
> in the relocation record of the SHT_RELA section.
>
> My understanding of the ELF specification is that the addend should
> rather be specified
> in the relocation record.
There are no rules as such. You are correct that when using RELA it
is customary to use the relocation addend field, but it is not a
requirement.
Changing this would mean that existing object files would no longer
work. Therefore, it should not be changed, unless there is some
fatal bug with the current implementation.
(I haven't checked myself where the addends are--I'm assuming your
report is correct.)
Ian
More information about the Binutils
mailing list