summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2015-05-19 13:38:30 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2015-05-19 13:38:30 +0000
commitbb4a3570579c32ab4d10f5b869e11394816214f2 (patch)
tree0354beb83785d395fe0a313e0f71bbf5d024a304 /gnu
parenta6e057c22bfe10374cd76b450b7806fd73f3079e (diff)
Keep visibility information for references to discarded sections.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/binutils-2.17/bfd/elflink.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gnu/usr.bin/binutils-2.17/bfd/elflink.c b/gnu/usr.bin/binutils-2.17/bfd/elflink.c
index b572921706f..75fff26a14b 100644
--- a/gnu/usr.bin/binutils-2.17/bfd/elflink.c
+++ b/gnu/usr.bin/binutils-2.17/bfd/elflink.c
@@ -3585,12 +3585,10 @@ 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, and have
- default visibility. */
+ /* Symbols from discarded section are undefined. We keep
+ its 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;