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]
Other format: [Raw text]

Re: SHT_RELA sections produced by gas: addend badly specified?


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


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