This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gold lto patch] Add plugin support for LDPR_PREVAILING_DEF_IRONLY_EXP


This patch adds LDPT_GET_SYMBOLS_V2 to the gold plugin API, which will
return the new LDPR_PREVAILING_DEF_IRONLY_EXP resolution code for
symbols that are referenced only from IR code, but are exported. For
more details, see GCC PR lto/47247:

   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47247

Tested on x86_64. OK to commit?

-cary

PS: Is this the right way to put GCC PR tags in a binutils ChangeLog?

PPS: Sorry, Honza, for taking so long. I had the implementation done
at the London conference, but never found the time to update the test
suite.


include/ChangeLog

	gcc PR lto/47247
	* plugin-api.h (enum ld_plugin_symbol_resolution): Add
	LDPR_PREVAILING_DEF_IRONLY_EXP.
	(enum ld_plugin_tag): Add LDPT_GET_SYMBOLS_V2.

gold/ChangeLog

	gcc PR lto/47247
	* plugin.cc (get_symbols_v2): New function.
	(Plugin::load): Add LDPT_GET_SYMBOLS_V2.
	(is_referenced_from_outside): New function.
	(Pluginobj::get_symbol_resolution_info): Add version parameter, return
	LDPR_PREVAILING_DEF_IRONLY_EXP when using new version.
	(get_symbols): Pass version parameter.
	(get_symbols_v2): New function.
	* plugin.h (Pluginobj::get_symbol_resolution_info): Add version
	parameter.
	* testsuite/plugin_test.c (get_symbols_v2): New static variable.
	(onload): Add LDPT_GET_SYMBOLS_V2.
	(all_symbols_read_hook): Use get_symbols_v2; check for
	LDPR_PREVAILING_DEF_IRONLY_EXP.
	* testsuite/plugin_test_3.sh: Update expected results.

Attachment: gold-plugin-v2-patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]