"ld -r" on mixed IR/non-IR objects (

H.J. Lu hjl.tools@gmail.com
Thu Dec 16 04:21:00 GMT 2010


On Wed, Dec 15, 2010 at 6:27 PM, Ian Lance Taylor <iant@google.com> wrote:
> "H.J. Lu" <hjl.tools@gmail.com> writes:
>
>> On Wed, Dec 15, 2010 at 5:23 PM, Ian Lance Taylor <iant@google.com> wrote:
>>> On Thu, Dec 9, 2010 at 6:29 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>>
>>>> The initial implementation of my proposal is available on hjl/lto-mixed
>>>> branch at
>>>>
>>>> http://git.kernel.org/?p=devel/binutils/hjl/x86.git;a=summary
>>>
>>> I don't know how to separate this idea from the other work on that branch.
>>
>> It is implemented on top of 2 stage linking infrastructure.
>
> Yes, which makes it hard to separate.  The idea is distinct from 2 stage
> linking, as far as I can tell.  I'm sure you saw my alternative proposal

That is true.  It happens to need similar book keeping as 2 stage linking.

> to 2 stage linking.

I saw it. Gold and ld can use different approaches to support plugin
as long as they work with the same GCC driver binary.

>
>> Linker knows nothing about the magic names.
>>
>> * Linker action:
>>   o Classify each input object file:
>>     * If there is a ".gnu_object_only" section, it is a mixed object file.
>>     * If there is a IR section, it is an IR object file.
>>
>> Linker checks if an object is claimed by the plugin. If yes,
>> it has an IR section.  Otherwise, it has no IR.
>>
>>     * Otherwise, it is a non-IR object file.
>
> Thanks for the clarification.  I will try again to understand the
> proposal.
>

I will update my proposal. Any feedbacks/comments are welcom/

Thanks.

-- 
H.J.



More information about the Binutils mailing list