[PATCH 1/3] Add native ELF and LTO support in collect2

Dave Korn dave.korn.cygwin@gmail.com
Mon Oct 11 15:34:00 GMT 2010


On 11/10/2010 11:17, Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
> 
> Change collect2 to read the symbol table directly on ELF systems
> using libelf. Also add support for the LTO symbol table.
> This way collect2 can resolve symbols in a object file
> that only has LTO information.
> 
> The LTO parser is closely patterned after the code
> in the lto-plugin.

  Rather than duplicating that code, did you consider implementing the plugin
API into collect2?

  I think this might be quite easy (based on the partial implementation in
lto-plugin/lto-symtab.c), and I think if you did it that way you would gain
object file format neutrality "for free" as a side-effect.

+  /* REMOVEME */

  You didn't removeme that one!

    cheers,
      DaveK



More information about the Gcc-patches mailing list