aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-tilegx.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elfxx-tilegx.c')
-rw-r--r--bfd/elfxx-tilegx.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/bfd/elfxx-tilegx.c b/bfd/elfxx-tilegx.c
index 2523813..b62fa33 100644
--- a/bfd/elfxx-tilegx.c
+++ b/bfd/elfxx-tilegx.c
@@ -2123,8 +2123,8 @@ tilegx_elf_gc_mark_hook (asection *sec,
h = (struct elf_link_hash_entry *) bh;
BFD_ASSERT (h != NULL);
h->mark = 1;
- if (h->u.weakdef != NULL)
- h->u.weakdef->mark = 1;
+ if (h->is_weakalias)
+ weakdef (h)->mark = 1;
sym = NULL;
}
}
@@ -2156,7 +2156,7 @@ tilegx_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
/* Make sure we know what is going on here. */
BFD_ASSERT (dynobj != NULL
&& (h->needs_plt
- || h->u.weakdef != NULL
+ || h->is_weakalias
|| (h->def_dynamic
&& h->ref_regular
&& !h->def_regular)));
@@ -2189,12 +2189,12 @@ tilegx_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;
return TRUE;
}