[PATCH] [GOLD] Add plugin API for processing plugin-added input files
Stephen Crane
sjc@immunant.com
Fri Nov 10 01:24:00 GMT 2017
Cary Coutant <ccoutant@gmail.com> writes:
> The patch for include/plugin-api.h needs to be separated out (with a
> ChangeLog entry of its own), and applied first to the GCC tree, then
> synced to binutils. After that, the rest of this patch is OK to apply.
Thanks. Attached is the patch for plugin-api.h which needs to be applied
to GCC and binutils (plugin_api_new_input.patch). Also attached is the
gold patch to implement the new functionality
(gold_new_input_handler.patch). ChangeLogs for both patches are below. I
don't have write access to either repo, so would you be willing to
commit on my behalf?
> Can you also update the GCC wiki whopr/driver page?
I'd be happy to if I can be added to the EditorGroup (my username is
StephenCrane).
include/ChangeLog:
2017-11-09 Stephen Crane <sjc@immunant.com>
* plugin-api.h: Add new plugin hook to allow processing of input
files added by a plugin.
(ld_plugin_new_input_handler): New funcion hook type.
(ld_plugin_register_new_input): New interface.
(LDPT_REGISTER_NEW_INPUT_HOOK): New enum val.
(tv_register_new_input): New member.
gold/ChangeLog:
2017-11-09 Stephen Crane <sjc@immunant.com>
* plugin.cc (Plugin::load): Include hooks for register_new_input
in transfer vector.
(Plugin::new_input): New function.
(register_new_input): New function.
(Plugin_manager::claim_file): Call Plugin::new_input if in
replacement phase.
* plugin.h (Plugin::set_new_input_handler): New function.
* testsuite/plugin_new_section_layout.c: New plugin to test
new_input plugin API.
* testsuite/plugin_final_layout.sh: Add new input test.
* testsuite/Makefile.am (plugin_layout_new_file): New test case.
* testsuite/Makefile.in: Regenerate.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plugin_api_new_input.patch
Type: text/x-patch
Size: 2086 bytes
Desc: plugin_api_new_input.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20171110/9a3f8437/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gold_new_input_handler.patch
Type: text/x-patch
Size: 18711 bytes
Desc: gold_new_input_handler.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20171110/9a3f8437/attachment-0001.bin>
More information about the Binutils
mailing list