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

2020-05-19 Thread totktonada.ru at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22983

--- Comment #8 from Alexander Turenko  ---
NB: Was moved from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84901

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

2018-06-12 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22983

--- Comment #7 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Nick Clifton :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=212b9bc7b4cfa7702005928dc3bffb3ba3a6e19a

commit 212b9bc7b4cfa7702005928dc3bffb3ba3a6e19a
Author: Nick Clifton 
Date:   Tue Jun 12 13:22:24 2018 +0100

Fix the PR22983 test so that it will work regardless of the order of the
symbols in the dynamic symbol table.

See email thread starting here for more details:
  https://sourceware.org/ml/binutils/2018-06/msg00036.html

PR 22983
* testsuite/ld-plugin/lto.exp: Use individual tests to check for
the presence of each expected symbol.
* testsuite/ld-plugin/pr22983.1.d: New file.
* testsuite/ld-plugin/pr22983.2.d: New file.
* testsuite/ld-plugin/pr22983.3.d: New file.
* testsuite/ld-plugin/pr22983.4.d: New file.

-- 
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


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

2018-03-20 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22983

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from H.J. Lu  ---
(In reply to Kirill Yukhin from comment #3)
> will release policies allow to back port the fix to 2.30?

Fixed for 2.31 and 2.30 branch.

-- 
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


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

2018-03-20 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22983

--- Comment #5 from cvs-commit at gcc dot gnu.org  ---
The binutils-2_30-branch branch has been updated by H.J. Lu
:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7c78c26eefbb884e63817abe01e2941601e70837

commit 7c78c26eefbb884e63817abe01e2941601e70837
Author: H.J. Lu 
Date:   Tue Mar 20 03:51:26 2018 -0700

Set non_ir_ref_dynamic if a symbol is made dynamic

If a symbol is made dynamic by --dynamic-list, it has non-IR reference.

bfd/

PR ld/22983
* elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.

ld/

PR ld/22983
* testsuite/ld-plugin/lto.exp: Run PR ld/22983 test.
* testsuite/ld-plugin/pr22983.d: New file.
* testsuite/ld-plugin/pr22983.t: Likewise.
* testsuite/ld-plugin/pr22983a.c: Likewise.
* testsuite/ld-plugin/pr22983b.c: Likewise.

(cherry picked from commit 416c34d683f2a17aefe19afb466af4316c7c603b)

-- 
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


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

2018-03-20 Thread kyukhin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22983

Kirill Yukhin  changed:

   What|Removed |Added

 CC||kyukhin at gcc dot gnu.org

--- Comment #3 from Kirill Yukhin  ---
(In reply to H.J. Lu from comment #2)
> A patch is posted at
> 
> https://sourceware.org/ml/binutils/2018-03/msg00237.html

HJ,
will release policies allow to back port the fix to 2.30?

-- 
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


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

2018-03-20 Thread rguenth at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22983

Richard Biener  changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu.org

-- 
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


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

2018-03-19 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22983

H.J. Lu  changed:

   What|Removed |Added

   Target Milestone|--- |2.31

--- Comment #2 from H.J. Lu  ---
A patch is posted at

https://sourceware.org/ml/binutils/2018-03/msg00237.html

-- 
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


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

2018-03-19 Thread totktonada.ru at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22983

Alexander Turenko  changed:

   What|Removed |Added

 CC||totktonada.ru at gmail dot com

-- 
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


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

2018-03-19 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22983

--- Comment #1 from H.J. Lu  ---
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 (_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