summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/binutils/bfd/elf64-sparc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/binutils/bfd/elf64-sparc.c')
-rw-r--r--gnu/usr.bin/binutils/bfd/elf64-sparc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gnu/usr.bin/binutils/bfd/elf64-sparc.c b/gnu/usr.bin/binutils/bfd/elf64-sparc.c
index 46e777552f2..c9e862677ac 100644
--- a/gnu/usr.bin/binutils/bfd/elf64-sparc.c
+++ b/gnu/usr.bin/binutils/bfd/elf64-sparc.c
@@ -2049,14 +2049,17 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
else if (h->root.type == bfd_link_hash_undefweak)
relocation = 0;
- else if (info->shared && !info->symbolic && !info->no_undefined)
+ else if (info->shared && !info->symbolic
+ && !info->no_undefined
+ && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
relocation = 0;
else
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd,
input_section, rel->r_offset,
- (!info->shared || info->no_undefined))))
+ (!info->shared || info->no_undefined
+ || ELF_ST_VISIBILITY (h->other)))))
return false;
relocation = 0;
}