http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42690

--- Comment #30 from H.J. Lu <hjl.tools at gmail dot com> 2010-11-24 15:07:17 
UTC ---
Goal:  We should preserve the same linker command line order as if there are no
IR.
Problem:
    a. LTO may generate extra symbol references which aren't in IR.
    b. It was worked around with -pass-through hack.  But it doesn't preserve
the link command line order.

Proposal:
    a. Remove -pass-through hack.
    b. GCC always passes the same command line to linker, with or without LTO. 
The only additions for LTO are LTO options.
    c. For linker:
        i. For a .o or DSO file on command line, don't process it.
            1) Present it to LTO:
                a) If it isn't claimed by LTO, send it to LTO as pass-through.
        ii. For an archive or linker script on command line:
            1) Present it to LTO recursively
            2) Send it to LTO as pass-through after it has been processed
recursively. 
    d. For LTO:
        i. Send translated files as well as pass-through files to linker in the
same order in which they are presented from linker.

Reply via email to