aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfnn-aarch64.c
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2019-06-10 16:40:54 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2019-06-17 17:58:53 +0100
commit39c05d9435893ed0b51c4b5c8e95fe977b983921 (patch)
tree923c3b06075cead58e2e6d4078c40dd25c2683f1 /bfd/elfnn-aarch64.c
parent08bb0061ba5c8826c1ec4d273d539cb32b5c217e (diff)
downloadgdb-39c05d9435893ed0b51c4b5c8e95fe977b983921.zip
gdb-39c05d9435893ed0b51c4b5c8e95fe977b983921.tar.gz
gdb-39c05d9435893ed0b51c4b5c8e95fe977b983921.tar.bz2
aarch64: remove unnecessary loc_hash_table traversal
The loc_hash_table should only contain local ifunc symbols. The current code already aborts if there is anything else and for defined ifunc symbols elfNN_aarch64_allocate_dynrelocs is a no-op. bfd/ChangeLog: * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove. (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal with elfNN_aarch64_allocate_local_dynrelocs.
Diffstat (limited to 'bfd/elfnn-aarch64.c')
-rw-r--r--bfd/elfnn-aarch64.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index ed64e82..ba9e97c 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -8861,25 +8861,6 @@ elfNN_aarch64_allocate_ifunc_dynrelocs (struct elf_link_hash_entry *h,
}
/* Allocate space in .plt, .got and associated reloc sections for
- local dynamic relocs. */
-
-static bfd_boolean
-elfNN_aarch64_allocate_local_dynrelocs (void **slot, void *inf)
-{
- struct elf_link_hash_entry *h
- = (struct elf_link_hash_entry *) *slot;
-
- if (h->type != STT_GNU_IFUNC
- || !h->def_regular
- || !h->ref_regular
- || !h->forced_local
- || h->root.type != bfd_link_hash_defined)
- abort ();
-
- return elfNN_aarch64_allocate_dynrelocs (h, inf);
-}
-
-/* Allocate space in .plt, .got and associated reloc sections for
local ifunc dynamic relocs. */
static bfd_boolean
@@ -9066,11 +9047,6 @@ elfNN_aarch64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
elf_link_hash_traverse (&htab->root, elfNN_aarch64_allocate_ifunc_dynrelocs,
info);
- /* Allocate .plt and .got entries, and space for local symbols. */
- htab_traverse (htab->loc_hash_table,
- elfNN_aarch64_allocate_local_dynrelocs,
- info);
-
/* Allocate .plt and .got entries, and space for local ifunc symbols. */
htab_traverse (htab->loc_hash_table,
elfNN_aarch64_allocate_local_ifunc_dynrelocs,