[gold][patch] Fix plugin API so that add_symbols is not required
Ian Lance Taylor
iant@google.com
Tue Dec 16 15:35:00 GMT 2008
Cary Coutant <ccoutant@google.com> writes:
> * plugin.cc (Plugin::load): Move LDPT_MESSAGE to front of transfer
> vector.
> (Plugin_manager::claim_file): Create plugin object even if
> plugin did not call the add_symbols callback.
> (Plugin_obj::get_symbol_resolution_info): Guard against plugin
> asking for more symbols than were added.
>
> * testsuite/Makefile.am (plugin_test_1): Add test case with
> no global symbols.
> (empty.syms): New target.
> * testsuite/Makefile.in: Regenerate.
> * testsuite/plugin_test.c (claim_file_hook): Add new debug
> message. Don't call add_symbols if no globals.
> (all_symbols_read_hook): Don't provide replacement for empty
> claimed file.
This is OK.
In general, please feel free to make any changes to plugin.cc and
plugin.h and associated tests, as long as you don't break building the
linker.
Thanks.
Ian
More information about the Binutils
mailing list