mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 14:49:38 +08:00
gcc PR lto/42757
* plugin.cc (Pluginobj::get_symbol_resolution_info): Check for prevailing definitions of common symbols. * testsuite/plugin_test_6.sh: New test case. * testsuite/plugin_common_test_1.c: New test case. * testsuite/plugin_common_test_2.c: New test case. * testsuite/Makefile.am (plugin_test_6): New test case. * testsuite/Makefile.in: Regenerate.
This commit is contained in:
@ -503,6 +503,10 @@ Pluginobj::get_symbol_resolution_info(int nsyms, ld_plugin_symbol* syms) const
|
||||
// The original symbol was undefined or common.
|
||||
if (lsym->source() != Symbol::FROM_OBJECT)
|
||||
res = LDPR_RESOLVED_EXEC;
|
||||
else if (lsym->object()->pluginobj() == this)
|
||||
res = (is_visible_from_outside(lsym)
|
||||
? LDPR_PREVAILING_DEF
|
||||
: LDPR_PREVAILING_DEF_IRONLY);
|
||||
else if (lsym->object()->pluginobj() != NULL)
|
||||
res = LDPR_RESOLVED_IR;
|
||||
else if (lsym->object()->is_dynamic())
|
||||
|
Reference in New Issue
Block a user