summaryrefslogtreecommitdiff
path: root/bfd/elf32-ppc.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-ppc.c')
-rw-r--r--bfd/elf32-ppc.c36
1 files changed, 10 insertions, 26 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 64c2839f421..69bb0d676e0 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -1735,9 +1735,9 @@ ppc_elf_relax_section (abfd, isec, link_info, again)
/* Get a copy of the native relocations. */
internal_relocs
- = _bfd_elf_link_read_relocs (abfd, isec, (PTR) NULL,
- (Elf_Internal_Rela *) NULL,
- link_info->keep_memory);
+ = _bfd_elf32_link_read_relocs (abfd, isec, (PTR) NULL,
+ (Elf_Internal_Rela *) NULL,
+ link_info->keep_memory);
if (internal_relocs == NULL)
goto error_return;
if (! link_info->keep_memory)
@@ -2694,9 +2694,7 @@ allocate_dynrelocs (h, inf)
htab = ppc_elf_hash_table (info);
if (htab->elf.dynamic_sections_created
- && h->plt.refcount > 0
- && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
- || h->root.type != bfd_link_hash_undefweak))
+ && h->plt.refcount > 0)
{
/* Make sure this symbol is output as a dynamic symbol. */
if (h->dynindx == -1
@@ -2791,10 +2789,8 @@ allocate_dynrelocs (h, inf)
else
htab->got->_raw_size += 4;
dyn = htab->elf.dynamic_sections_created;
- if ((info->shared
- || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, &eh->elf))
- && (ELF_ST_VISIBILITY (eh->elf.other) == STV_DEFAULT
- || eh->elf.root.type != bfd_link_hash_undefweak))
+ if (info->shared
+ || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, &eh->elf))
{
/* All the entries we allocated need relocs. */
htab->relgot->_raw_size
@@ -2835,12 +2831,6 @@ allocate_dynrelocs (h, inf)
pp = &p->next;
}
}
-
- /* Also discard relocs on undefined weak syms with non-default
- visibility. */
- if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
- && h->root.type == bfd_link_hash_undefweak)
- eh->dyn_relocs = NULL;
}
else if (ELIMINATE_COPY_RELOCS)
{
@@ -3860,9 +3850,9 @@ ppc_elf_tls_optimize (obfd, info)
int expecting_tls_get_addr;
/* Read the relocations. */
- relstart = _bfd_elf_link_read_relocs (ibfd, sec, (PTR) NULL,
- (Elf_Internal_Rela *) NULL,
- info->keep_memory);
+ relstart = _bfd_elf32_link_read_relocs (ibfd, sec, (PTR) NULL,
+ (Elf_Internal_Rela *) NULL,
+ info->keep_memory);
if (relstart == NULL)
return FALSE;
@@ -4803,10 +4793,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
/* Generate relocs for the dynamic linker. */
- if ((info->shared || indx != 0)
- && (h == NULL
- || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
- || h->root.type != bfd_link_hash_undefweak))
+ if (info->shared || indx != 0)
{
outrel.r_offset = (htab->got->output_section->vma
+ htab->got->output_offset
@@ -5008,9 +4995,6 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
/* Fall thru. */
if ((info->shared
- && (h == NULL
- || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
- || h->root.type != bfd_link_hash_undefweak)
&& (MUST_BE_DYN_RELOC (r_type)
|| (h != NULL
&& h->dynindx != -1