summaryrefslogtreecommitdiff
path: root/bfd/elf32-sparc.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2000-05-23 14:05:50 +0000
committerH.J. Lu <hjl@lucon.org>2000-05-23 14:05:50 +0000
commited28cb66da87540152d35043f2627b0ba895e1c8 (patch)
tree99230feca6762478143dbe001de1c41404d79c96 /bfd/elf32-sparc.c
parentd626b2c451ff9c0396a252e74a0f2f9a457fe37a (diff)
downloadbinutils-redhat-ed28cb66da87540152d35043f2627b0ba895e1c8.tar.gz
2000-05-23 H.J. Lu <hjl@gnu.org>
* elf32-i386.c (elf_i386_relocate_section): Don't allow the undefined symbol with the non-default visibility attributes. * elf-hppa.h (elf_hppa_relocate_section): Likewise. * elf32-arm.h (elf32_arm_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mips.c (mips_elf_calculate_relocation): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. * elf64-ia64.c (elf64_ia64_relocate_section): Likewise. * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
Diffstat (limited to 'bfd/elf32-sparc.c')
-rw-r--r--bfd/elf32-sparc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c
index e61a82fabe..1c8d0ba275 100644
--- a/bfd/elf32-sparc.c
+++ b/bfd/elf32-sparc.c
@@ -1213,14 +1213,17 @@ elf32_sparc_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;
}