aboutsummaryrefslogtreecommitdiff
path: root/gold/plugin.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/plugin.cc')
-rw-r--r--gold/plugin.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/gold/plugin.cc b/gold/plugin.cc
index ebda0af..637613c 100644
--- a/gold/plugin.cc
+++ b/gold/plugin.cc
@@ -818,7 +818,9 @@ Pluginobj::Pluginobj(const std::string& name, Input_file* input_file,
}
// Return TRUE if a defined symbol is referenced from outside the
-// universe of claimed objects.
+// universe of claimed objects. Only references from relocatable,
+// non-IR (unclaimed) objects count as a reference. References from
+// dynamic objects count only as "visible".
static inline bool
is_referenced_from_outside(Symbol* lsym)
@@ -838,6 +840,8 @@ is_referenced_from_outside(Symbol* lsym)
static inline bool
is_visible_from_outside(Symbol* lsym)
{
+ if (lsym->in_dyn())
+ return true;
if (parameters->options().export_dynamic() || parameters->options().shared())
return lsym->is_externally_visible();
return false;