This is the mail archive of the binutils@sourceware.org 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: Grouping in linker sections


obair <nabble@rehill.info> writes:

> Alan Modra wrote:
>> 
>> Link in two stages.  First one is ld -r to pick out the objects you
>> need.  Second one uses a linker script to place the ld -r output
>> where you want it.
>> 
>> -- 
>> Alan Modra
>> Australia Development Lab, IBM
>> 
>> 
>
> Thanks for the response.
> I think the problem with two-stage linking is that the objects that are
> required to be linked in the first stage are not self contained; they call
> functions in the second-stage objects (those whose location does not
> matter).  The paths to these "outside" calls are not followed during the
> critical time before the re-read occurs, however.

I don't understand the objection.  ld -r permits unresolved
relocations, so the fact that the first-stage objects are not
self-contained does not seem relevant.

Ian


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