RFC: How should the LTO plugin handle object files containing both LTO and non-LTO data ?

H.J. Lu hjl.tools@gmail.com
Tue Oct 13 11:16:17 GMT 2020


On Tue, Oct 13, 2020 at 3:46 AM Nick Clifton via Binutils
<binutils@sourceware.org> wrote:
>
> Hi Guys,
>
> >   Next I think that the best solution would be if the lto plugin were to
> >   examine the .symtab section of any file it is processing,
>
> Except that the plugin does not know how to process ELF format symbol
> tables, and adding such code would be silly given that this is already
> supported by the BFD library.
>
> So maybe tools like nm and ld should process lto object files twice.
> First as an lto object file and then secondly as an ordinary object
> file.  Except that the second time around only new symbols/code/data
> are extracted.  Hmm, which might be hard to do.  I guess I need to
> think on this some more.

See:

https://sourceware.org/bugzilla/show_bug.cgi?id=12291
https://sourceware.org/bugzilla/show_bug.cgi?id=12430
https://sourceware.org/bugzilla/show_bug.cgi?id=13298

and try ld in

https://gitlab.com/x86-binutils/binutils-gdb/-/commits/users/hjl/lto-mixed/master

to generate .o files with LTO binary data and non-LTO binary data.


--
H.J.


More information about the Binutils mailing list