Cary Coutant 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 * 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 * 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.