get_symbols() plugin API tweak to support --start-lib/--end-lib.

Let the plugin know that a file is not being included in the link by
returning LDPS_NO_SYMS from get_symbols().

include/
	* plugin-api.h (enum ld_plugin_tag): Add LDPT_GET_SYMBOLS_V3.

gold/
	* plugin.h (Pluginobj::get_symbol_resolution_info): Add version
	parameter.
	* plugin.cc (get_symbols_v3): New function.
	(Plugin::load): Add LDPT_GET_SYMBOLS_V3.
	(Pluginobj::get_symbol_resolution_info): Return LDPS_NO_SYMS when using
	new version.
This commit is contained in:
Evgenii Stepanov 2016-03-03 11:36:36 -08:00 committed by Cary Coutant
parent bdf7e23048
commit 95ecdfbfcb
10 changed files with 175 additions and 18 deletions

View file

@ -384,7 +384,8 @@ enum ld_plugin_tag
LDPT_ALLOW_SECTION_ORDERING = 24,
LDPT_GET_SYMBOLS_V2 = 25,
LDPT_ALLOW_UNIQUE_SEGMENT_FOR_SECTIONS = 26,
LDPT_UNIQUE_SEGMENT_FOR_SECTIONS = 27
LDPT_UNIQUE_SEGMENT_FOR_SECTIONS = 27,
LDPT_GET_SYMBOLS_V3 = 28
};
/* The plugin transfer vector. */