* elflink.c (elf_link_add_object_symbols): Force symbols in
authorJulian Brown <julian@codesourcery.com>
Thu, 24 Feb 2005 15:28:56 +0000 (15:28 +0000)
committerJulian Brown <julian@codesourcery.com>
Thu, 24 Feb 2005 15:28:56 +0000 (15:28 +0000)
discarded COMDAT group sections to have default visibility.

bfd/ChangeLog
bfd/elflink.c

index 773210c28f04c30fc1cbff3aaab5319fbb3ead52..8e07f91d2d793eb1bc1691fb894cde01d4e01270 100644 (file)
@@ -1,3 +1,8 @@
+2005-02-24  Julian Brown  <julian@sirius.codesourcery.com>
+
+       * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
+       COMDAT group sections to have default visibility.
+
 2005-02-24  Alan Modra  <amodra@bigpond.net.au>
 
        * coffcode.h (coff_print_aux): Warning fix.
index 16a368ef37f8c32867b5b5ecc9cef61db70703d1..a21a54b93240e8ac22e36f15b5f611573a22c722 100644 (file)
@@ -3575,9 +3575,12 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
            sec = bfd_abs_section_ptr;
          else if (sec->kept_section)
            {
-             /* Symbols from discarded section are undefined.  */
+             /* Symbols from discarded section are undefined, and have
+                default visibility.  */
              sec = bfd_und_section_ptr;
              isym->st_shndx = SHN_UNDEF;
+             isym->st_other = STV_DEFAULT
+                              | (isym->st_other & ~ ELF_ST_VISIBILITY(-1));
            }
          else if ((abfd->flags & (EXEC_P | DYNAMIC)) != 0)
            value -= sec->vma;