This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: Update LTO plugin interface


"H.J. Lu" <hjl.tools@gmail.com> writes:

> On Wed, Dec 1, 2010 at 5:53 PM, Ian Lance Taylor <iant@google.com> wrote:
>
>> Or I'll rephrase: are there any cases for which using -pass-through for
>> the set of libraries that the gcc driver automatically adds to the end
>> of the link line would not be a complete solution?
>>
>> I'm not saying -pass-through is the solution we should be using. ÂIt's
>> clearly a bit of a hack. ÂHowever, I am asking the question seriously,
>> because if we have to do a complete relink, then let's do a complete
>> relink, but if we don't have to do one, let's definitely not.
>
> Nothing can't be solved with a hack :-).

I propose that we add a new linker option: --plugin-callback.  At each
point where this option appears on the command line, the linker will
call a new plugin callback entry point.  The LTO plugin will replace the
all_symbols_read callback with this one.  We will have the gcc driver
run the linker more or less like this:

object-files -lc -lgcc --plugin-callback -lc -lgcc crtend.o crtn.o

Ian


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