On Fri, Dec 3, 2010 at 10:07 PM, H.J. Lu <hjl.to...@gmail.com> wrote:
> On Fri, Dec 3, 2010 at 6:34 PM, H.J. Lu <hjl.to...@gmail.com> wrote:
>> On Fri, Dec 3, 2010 at 6:23 PM, Dave Korn <dave.korn.cyg...@gmail.com> wrote:
>>> On 04/12/2010 01:24, H.J. Lu wrote:
>>>
>>>> I checked in a patch to implement stage 2 linking. Everything
>>>> seems to work, including "gcc -static ... -lm".
>>>
>>>  Any chance you could send a complete diff?
>>>
>>
>> I will submit a complete diff after I fix a few corner cases.
>> In the meantime, you can clone my git tree and do a "git diff".
>>
>
> Hi,
>
> This patch implements 2 stage BFD linker for LTO plugin.
> It works with current LTO API on all cases I tested.
>
> Known issue:  --whole-archive will call plugin on archives with IR
> in stage 2 linking. But ld never calls plugin to get back object files.
> I will try to avoid it in a follow up patch.
>

This turns out not a problem. In stage 2 linking, for --whole-archive
we call plugin to get symbols in the IR element of an archive and
it will be ignored for stage 2 linking.  It is OK since we already get
the trans object files back for stage 2 linking.

BTW, the new linker passed bootstrap-lto with all default languages.
I am planning to include this patch in the next Linux binutils.


-- 
H.J.

Reply via email to