diff options
author | Cary Coutant <ccoutant@google.com> | 2010-04-06 21:56:24 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@google.com> | 2010-04-06 21:56:24 +0000 |
commit | be234d887ed5127f8a87aecb6e131679398485c1 (patch) | |
tree | 3e54d235fd89df3866ea696bd10ab969a883f1a4 /gold/plugin.cc | |
parent | 3149d8c1150e24222c6c41e2c0fdde42f202d750 (diff) | |
download | gdb-be234d887ed5127f8a87aecb6e131679398485c1.zip gdb-be234d887ed5127f8a87aecb6e131679398485c1.tar.gz gdb-be234d887ed5127f8a87aecb6e131679398485c1.tar.bz2 |
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.
Diffstat (limited to 'gold/plugin.cc')
-rw-r--r-- | gold/plugin.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gold/plugin.cc b/gold/plugin.cc index d9b4c59..2ee1301 100644 --- a/gold/plugin.cc +++ b/gold/plugin.cc @@ -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()) |