Module Name:    src
Committed By:   joerg
Date:           Fri Mar 25 23:04:41 UTC 2016

Modified Files:
        src/external/gpl3/binutils/dist/bfd: elflink.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/binutils/dist/bfd/elflink.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/binutils/dist/bfd/elflink.c
diff -u src/external/gpl3/binutils/dist/bfd/elflink.c:1.9 src/external/gpl3/binutils/dist/bfd/elflink.c:1.10
--- src/external/gpl3/binutils/dist/bfd/elflink.c:1.9	Fri Jan 29 14:42:44 2016
+++ src/external/gpl3/binutils/dist/bfd/elflink.c	Fri Mar 25 23:04:41 2016
@@ -1252,6 +1252,7 @@ _bfd_elf_merge_symbol (bfd *abfd,
      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 @@ _bfd_elf_merge_symbol (bfd *abfd,
     }
   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 @@ elf_link_output_extsym (struct bfd_hash_
       && 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)

Reply via email to