Source-Changes-HG archive

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

[src/trunk]: src/external/gpl3/binutils/dist/bfd If a protected symbol is def...



details:   https://anonhg.NetBSD.org/src/rev/2df374c31714
branches:  trunk
changeset: 814524:2df374c31714
user:      joerg <joerg%NetBSD.org@localhost>
date:      Fri Mar 25 23:04:41 2016 +0000

description:
If a protected symbol is defined in a shared library, it should still
provide an implementation. Fix the merging rules.

diffstat:

 external/gpl3/binutils/dist/bfd/elflink.c |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (32 lines):

diff -r 09311b2850a3 -r 2df374c31714 external/gpl3/binutils/dist/bfd/elflink.c
--- a/external/gpl3/binutils/dist/bfd/elflink.c Fri Mar 25 22:13:23 2016 +0000
+++ b/external/gpl3/binutils/dist/bfd/elflink.c Fri Mar 25 23:04:41 2016 +0000
@@ -1252,6 +1252,7 @@
      definition from a dynamic object.  */
   if (newdyn
       && ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+      && ELF_ST_VISIBILITY (h->other) != STV_PROTECTED
       && !bfd_is_und_section (sec))
     {
       *skip = TRUE;
@@ -1269,6 +1270,7 @@
     }
   else if (!newdyn
           && ELF_ST_VISIBILITY (sym->st_other) != STV_DEFAULT
+          && ELF_ST_VISIBILITY (sym->st_other) != STV_PROTECTED
           && h->def_dynamic)
     {
       /* If the new symbol with non-default visibility comes from a
@@ -9335,10 +9337,11 @@
       && h->def_dynamic)
     sym.st_size = 0;
 
-  /* If a non-weak symbol with non-default visibility is not defined
+  /* If a non-weak symbol with non-public visibility is not defined
      locally, it is a fatal error.  */
   if (!bfd_link_relocatable (flinfo->info)
       && ELF_ST_VISIBILITY (sym.st_other) != STV_DEFAULT
+      && ELF_ST_VISIBILITY (sym.st_other) != STV_PROTECTED
       && ELF_ST_BIND (sym.st_info) != STB_WEAK
       && h->root.type == bfd_link_hash_undefined
       && !h->def_regular)



Home | Main Index | Thread Index | Old Index