[RFC/WIP] Add plugin infrastructure to ld.
Dave Korn
dave.korn.cygwin@gmail.com
Thu Sep 9 20:04:00 GMT 2010
More information about the Binutils mailing list
Thu Sep 9 20:04:00 GMT 2010
- Previous message (by thread): PATCH: PR ld/11998: Bogus linker warning
- Next message (by thread): [RFC/WIP] Add plugin infrastructure to ld.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi list,
For the sake of really properly supporting LTO in GCC on COFF targets, I
figure the best line of attack is to try and support the GOLD plugin
architecture in GNU LD. Since 2.21 is becoming imminent, I figure it's best
to discuss this idea now, in case there's still time to get it done for that.
What I've attached here is basically what would be the 1/N in a series of
patches to do just that. It adds the entire infrastructure for LD to load
plugins, initialise them, and trigger callbacks, but none of the actual
functionality such as claiming files, passing or receiving symbols, etc. All
the code is only conditionally included in the build under control of a new
--enable-plugins configure option.
There's no testsuite or docs yet, like I said, it's WIP and just
infrastructure. However I did add a couple of dummy plugins that can be used
to verify the interface basically works at the command line.
This, of course, is the easy bit. The more complex part is what I'd like to
ask if anyone else has been thinking about or has any advice or suggestions:
how to make LD play correctly with the plugin API. I'm not even certain that
their modes of operation are going to be commensurate enough to make them fit,
so I wrote this framework as a testbed to try and prove the concept.
For instance, it seems to me that LD has many locations that open input
files, all of which error out if they fail to find their file, and all of
which would need patching to call the 'claim files' hook and leave the file
alone but still not error out if the file got claimed. I'm even less certain
if LD's way of dealing with archives and archive members is commensurate
enough with GOLD's to be compatible.
So before I plough ahead with trying to design a solution, I thought I'd ask
if anyone already has clear ideas about how this should be done. Anyone?
cheers,
DaveK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ld-plugin-infrastructure.diff
Type: text/x-c
Size: 30240 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20100909/4f899221/attachment.bin>
- Previous message (by thread): PATCH: PR ld/11998: Bogus linker warning
- Next message (by thread): [RFC/WIP] Add plugin infrastructure to ld.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list