summaryrefslogtreecommitdiff
path: root/bfd/elf32-mips.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-mips.c')
-rw-r--r--bfd/elf32-mips.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index 4892d5afd3d..1d258b04507 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -5917,7 +5917,8 @@ mips_elf_calculate_relocation (abfd,
and check to see if they exist by looking at their
addresses. */
symbol = 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)
symbol = 0;
else if (strcmp (h->root.root.root.string, "_DYNAMIC_LINK") == 0)
{
@@ -5935,7 +5936,8 @@ mips_elf_calculate_relocation (abfd,
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.root.string, input_bfd,
input_section, relocation->r_offset,
- (!info->shared || info->no_undefined))))
+ (!info->shared || info->no_undefined
+ || ELF_ST_VISIBILITY (h->other)))))
return bfd_reloc_undefined;
symbol = 0;
}