This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: SHT_RELA sections produced by gas: addend badly specified?
- From: Ian Lance Taylor <ian at airs dot com>
- To: Cédric Hombourger <chombourger at nexwave-solutions dot com>
- Cc: binutils at sources dot redhat dot com
- Date: 27 Aug 2003 09:36:34 -0700
- Subject: Re: SHT_RELA sections produced by gas: addend badly specified?
- References: <3F4C5D15.1050407@nexwave-solutions.com>
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