https://sourceware.org/bugzilla/show_bug.cgi?id=22983
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> --- I am testing: diff --git a/ld/plugin.c b/ld/plugin.c index 259c18f3ff..4c806ee702 100644 --- a/ld/plugin.c +++ b/ld/plugin.c @@ -634,6 +634,7 @@ is_visible_from_outside (struct ld_plugin_symbol *lsym, return TRUE; if (blhe->non_ir_ref_dynamic || link_info.export_dynamic + || link_info.dynamic || bfd_link_dll (&link_info)) { /* Check if symbol is hidden by version script. */ @@ -645,7 +646,8 @@ is_visible_from_outside (struct ld_plugin_symbol *lsym, { struct elf_link_hash_entry *el = (struct elf_link_hash_entry *)blhe; int vis = ELF_ST_VISIBILITY (el->other); - return vis == STV_DEFAULT || vis == STV_PROTECTED; + return ((el->dynamic || link_info.export_dynamic) + && (vis == STV_DEFAULT || vis == STV_PROTECTED)); } /* On non-ELF targets, we can safely make inferences by considering what visibility the plugin would have liked to apply when it first -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils