aarch64: remove unnecessary loc_hash_table traversal
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Mon, 10 Jun 2019 15:40:54 +0000 (16:40 +0100)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Mon, 17 Jun 2019 16:58:53 +0000 (17:58 +0100)
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.

bfd/ChangeLog
bfd/elfnn-aarch64.c

index fa07d3e11c6d834541a6bcf4dab588e52ae2b827..e1767fe7949ca5632ecba5fe823a9ec5c5f8ece5 100644 (file)
@@ -1,3 +1,9 @@
+2019-06-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+       * 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.
+
 2019-06-14  Szabolcs Nagy  <szabolcs.nagy@arm.com>
 
        * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
index ed64e8256c7442e5973e221afe57f9b08c91f44f..ba9e97c1e9be74b7911da5af4620347a9f9cc1fc 100644 (file)
@@ -8860,25 +8860,6 @@ elfNN_aarch64_allocate_ifunc_dynrelocs (struct elf_link_hash_entry *h,
   return TRUE;
 }
 
-/* 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.  */
 
@@ -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,
This page took 0.028077 seconds and 4 git commands to generate.