bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/22983] --dynamic-list=export is ignored in presence of -flto


From: hjl.tools at gmail dot com
Subject: [Bug ld/22983] --dynamic-list=export is ignored in presence of -flto
Date: Mon, 19 Mar 2018 17:59:31 +0000

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]