This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Getting LTO incremental linking work
- From: Andi Kleen <ak at linux dot intel dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, rguenther at suse dot de, hongjiu dot lu at intel dot com, ccoutant at google dot com, iant at google dot com
- Date: Wed, 25 Nov 2015 18:02:08 -0800
- Subject: Re: [RFC] Getting LTO incremental linking work
- Authentication-results: sourceware.org; auth=none
- References: <20151125085912 dot GD58491 at kam dot mff dot cuni dot cz> <20151125235858 dot GI8438 at tassilo dot jf dot intel dot com> <20151126003828 dot GH20593 at kam dot mff dot cuni dot cz> <20151126005438 dot GJ8438 at tassilo dot jf dot intel dot com> <20151126015504 dot GI20593 at kam dot mff dot cuni dot cz>
On Thu, Nov 26, 2015 at 02:55:04AM +0100, Jan Hubicka wrote:
> >
> > > I suppose we could play a games here with slim LTO: claim the file, see if
> > > there are any symbols defined in the non-LTO symbol table and if so, interpret
> > > read the symbol table and tell linker about the symbols and at the very end
> > > include the offending object file in the list of objects returned back to
> > > linker.
> > >
> > > The linker then should take the symbols it wants. There would be some fun
> > > involved, because the resolution info we get will consider the symbols
> > > defined in that object file to be IR which would need to be compensated for.
> >
> > Yes something like that would be needed.
>
> Actually I think it is harder than that, because we need to strip LTO data
> from the object files, so we do not end up with duplicated LTO if the object
> file was already having both LTO and non-LTO stuff in it.
When I started with LTO I was looking into that, and that is why I originally
implemented slim LTO as a first step. But then I realized that that just adding
the postfixes is much easier, after HJ proposed his linker based solution.
Anyways can stay with the special binutils for the kernel for now, but it's
a bit of a pain for users to install them (user feedback is generally that
this is the hardest part)
I'm a bit surprised that the programs you test (Firefox, LibreOffice etc.)
don't have .S files.
>
> I am not sure we can/want to implement this w/o some sort of support from
> plugin side. It would basically mean doing another incremnetal linker in the
> plugin.
>
> How does HJ's binutils work for fat LTO?
I believe it works too (pretty sure I tested it at some point)
Here's the original design spec
https://sourceware.org/ml/binutils/2011-04/msg00404.html
-Andi
--
ak@linux.intel.com -- Speaking for myself only