aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-i370.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-i370.c')
-rw-r--r--bfd/elf32-i370.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/bfd/elf32-i370.c b/bfd/elf32-i370.c
index 18d4a25..a44ff4c 100644
--- a/bfd/elf32-i370.c
+++ b/bfd/elf32-i370.c
@@ -500,11 +500,14 @@ i370_elf_adjust_dynamic_symbol (info, h)
/* Make sure we know what is going on here. */
BFD_ASSERT (dynobj != NULL
- && (h->needs_plt
- || h->u.weakdef != NULL
- || (h->def_dynamic
- && h->ref_regular
- && !h->def_regular)));
+ && ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT)
+ || h->weakdef != NULL
+ || ((h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_DYNAMIC) != 0
+ && (h->elf_link_hash_flags
+ & ELF_LINK_HASH_REF_REGULAR) != 0
+ && (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0)));
s = bfd_get_section_by_name (dynobj, ".rela.text");
BFD_ASSERT (s != NULL);
@@ -513,12 +516,12 @@ i370_elf_adjust_dynamic_symbol (info, h)
/* 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->weakdef != NULL)
{
- 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;
+ BFD_ASSERT (h->weakdef->root.type == bfd_link_hash_defined
+ || h->weakdef->root.type == bfd_link_hash_defweak);
+ h->root.u.def.section = h->weakdef->root.u.def.section;
+ h->root.u.def.value = h->weakdef->root.u.def.value;
return TRUE;
}
@@ -566,7 +569,7 @@ i370_elf_adjust_dynamic_symbol (info, h)
srel = bfd_get_section_by_name (dynobj, ".rela.bss");
BFD_ASSERT (srel != NULL);
srel->size += sizeof (Elf32_External_Rela);
- h->needs_copy = 1;
+ h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
}
/* We need to figure out the alignment required for this symbol. I
@@ -1215,7 +1218,8 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
sec = h->root.u.def.section;
if (info->shared
&& ((! info->symbolic && h->dynindx != -1)
- || !h->def_regular)
+ || (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0)
&& (input_section->flags & SEC_ALLOC) != 0
&& (r_type == R_I370_ADDR31
|| r_type == R_I370_COPY
@@ -1334,7 +1338,8 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
become local. */
else if (h != NULL
&& ((! info->symbolic && h->dynindx != -1)
- || !h->def_regular))
+ || (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0))
{
BFD_ASSERT (h->dynindx != -1);
outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);