This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: relocations with addenda
- From: Nick Clifton <nickc at redhat dot com>
- To: corey_schuhen at BEELINE dot ag
- Cc: stuart_clarke at BEELINE dot ag, binutils at sources dot redhat dot com
- Date: 04 Nov 2002 16:40:15 +0000
- Subject: Re: relocations with addenda
- References: <200210262210.55061.stuart_clarke@beeline.ag><m38z0pih0l.fsf@north-pole.nickc.cambridge.redhat.com><200210240800.44604.corey_schuhen@BEELINE.ag>
Hi Corey,
> Thank you for your reply. We thought this may be the case. Is it
> required for use to port both LD and GAS?
Yes...
> It seemed to me from some comments in the LD source code that it
> reads in the input object files and stores them (in RAM) in a
> format-neutral way.
The input section headers and symbol tables are converted into an
internal format, but relocations and section contents are not
converted.
> It would seem to me that if LD is changed to output RELA then it
> does not matter that its inputs are in REL.
There is also the case of a partial link. (Using the "-r" command
line switch to the linker). The output of the linker in this case is
supposed to be resubmitted to the linker at a later time, and so it
needs to keep the relocations in the format that the linker will
expect.
Cheers
Nick