diff options
Diffstat (limited to 'bfd/elf32-frv.c')
-rw-r--r-- | bfd/elf32-frv.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c index 9341fe8acca..d95fa800c87 100644 --- a/bfd/elf32-frv.c +++ b/bfd/elf32-frv.c @@ -2755,7 +2755,7 @@ _frv_create_got_section (bfd *abfd, struct bfd_link_info *info) bed->collect, &bh))) return FALSE; h = (struct elf_link_hash_entry *) bh; - h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR; + h->def_regular = 1; h->type = STT_OBJECT; /* Machine-specific: we want the symbol for executables as @@ -2814,7 +2814,7 @@ _frv_create_got_section (bfd *abfd, struct bfd_link_info *info) bed->collect, &bh))) return FALSE; h = (struct elf_link_hash_entry *) bh; - h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR; + h->def_regular = 1; h->type = STT_OBJECT; /* Machine-specific: we want the symbol for executables as well. */ @@ -2869,7 +2869,7 @@ elf32_frvfdpic_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) FALSE, get_elf_backend_data (abfd)->collect, &bh))) return FALSE; h = (struct elf_link_hash_entry *) bh; - h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR; + h->def_regular = 1; h->type = STT_OBJECT; if (! info->executable @@ -3677,7 +3677,7 @@ elf32_frvfdpic_always_size_sections (bfd *output_bfd, FALSE, FALSE, FALSE); if (! h || h->root.type != bfd_link_hash_defined || h->type != STT_OBJECT - || !(h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)) + || !h->def_regular) { struct bfd_link_hash_entry *bh = NULL; @@ -3689,7 +3689,7 @@ elf32_frvfdpic_always_size_sections (bfd *output_bfd, return FALSE; h = (struct elf_link_hash_entry *) bh; - h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR; + h->def_regular = 1; h->type = STT_OBJECT; } @@ -3865,23 +3865,20 @@ elf32_frvfdpic_adjust_dynamic_symbol /* Make sure we know what is going on here. */ BFD_ASSERT (dynobj != NULL - && (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))); + && (h->u.weakdef != NULL + || (h->def_dynamic + && h->ref_regular + && !h->def_regular))); /* 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->weakdef != NULL) + if (h->u.weakdef != NULL) { - 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; + 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; } return TRUE; |