This is the mail archive of the gcc-patches@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: [RFC] Getting LTO incremental linking work


> > > In theory we could change the build system to avoid that case though, but
> > > it would need some changes.
> > > 
> > > It would be better if that could be handled somehow.
> > 
> > How does this work with your patchset?  Ideally we should have way to claim
> > only portions of object files, but we don't have that. If we claim the file,
> > the symbols in real symbol table are not visible.
> 
> It works with HJ's Linux binutils. It handles LTO and non LTO separately.
> 
> > 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.

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?

Honza


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