From: Julian Brown Date: Thu, 24 Feb 2005 15:28:56 +0000 (+0000) Subject: * elflink.c (elf_link_add_object_symbols): Force symbols in X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1f02cbd9eee244ec63394d729e052a63bd0e8614;p=binutils-gdb.git * elflink.c (elf_link_add_object_symbols): Force symbols in discarded COMDAT group sections to have default visibility. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 773210c28f0..8e07f91d2d7 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2005-02-24 Julian Brown + + * elflink.c (elf_link_add_object_symbols): Force symbols in discarded + COMDAT group sections to have default visibility. + 2005-02-24 Alan Modra * coffcode.h (coff_print_aux): Warning fix. diff --git a/bfd/elflink.c b/bfd/elflink.c index 16a368ef37f..a21a54b9324 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -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;