aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorJulian Brown <julian@codesourcery.com>2005-02-24 15:28:56 +0000
committerJulian Brown <julian@codesourcery.com>2005-02-24 15:28:56 +0000
commit1f02cbd9eee244ec63394d729e052a63bd0e8614 (patch)
treeb47bbf986d27c82e43d044af931c52c3b08914a0 /bfd/elflink.c
parent920d2a441963dd93b50e836dfabdd58e7f0016fb (diff)
downloadgdb-1f02cbd9eee244ec63394d729e052a63bd0e8614.zip
gdb-1f02cbd9eee244ec63394d729e052a63bd0e8614.tar.gz
gdb-1f02cbd9eee244ec63394d729e052a63bd0e8614.tar.bz2
* elflink.c (elf_link_add_object_symbols): Force symbols in
discarded COMDAT group sections to have default visibility.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 16a368e..a21a54b 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;