aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-ppc.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-ppc.c')
-rw-r--r--bfd/elf32-ppc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index f68a7a4..756523b 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -5464,7 +5464,7 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
BFD_ASSERT (htab->elf.dynobj != NULL
&& (h->needs_plt
|| h->type == STT_GNU_IFUNC
- || h->u.weakdef != NULL
+ || h->is_weakalias
|| (h->def_dynamic
&& h->ref_regular
&& !h->def_regular)));
@@ -5499,8 +5499,8 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
Note that function symbols are not supposed to have weakdefs,
but since symbols may not be correctly typed we handle them
here. */
- h->non_got_ref = (h->u.weakdef != NULL
- ? h->u.weakdef->non_got_ref
+ h->non_got_ref = (h->is_weakalias
+ ? weakdef (h)->non_got_ref
: !local && (((struct ppc_elf_link_hash_entry *) h)
->dyn_relocs != NULL));
@@ -5567,14 +5567,14 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
/* If this is a weak symbol, and there is a real definition, the
processor independent code will have arranged for us to see the
real definition first, and we can just use the same value. */
- if (h->u.weakdef != NULL)
+ if (h->is_weakalias)
{
- BFD_ASSERT (h->u.weakdef->root.type == bfd_link_hash_defined
- || h->u.weakdef->root.type == bfd_link_hash_defweak);
- h->root.u.def.section = h->u.weakdef->root.u.def.section;
- h->root.u.def.value = h->u.weakdef->root.u.def.value;
+ struct elf_link_hash_entry *def = weakdef (h);
+ BFD_ASSERT (def->root.type == bfd_link_hash_defined);
+ h->root.u.def.section = def->root.u.def.section;
+ h->root.u.def.value = def->root.u.def.value;
if (ELIMINATE_COPY_RELOCS)
- h->non_got_ref = h->u.weakdef->non_got_ref;
+ h->non_got_ref = def->non_got_ref;
return TRUE;
}