]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove layout_sections_again argument to size_stubs
authorMatthew Malcomson <matthew.malcomson@arm.com>
Fri, 5 Aug 2022 16:19:35 +0000 (17:19 +0100)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 1 Sep 2022 23:39:47 +0000 (16:39 -0700)
This was originally the first place that a function in
bfd/elfnn-aarch64.c was given a reference to
gldaarch64_layout_sections_again, and hence was the natural place to
store the function onto the elf hash table.

Ever since the introduction of elfNN_c64_resize_sections we have been
performing this operation in that function before this size_stubs
function.

Hence it seems sensible to remove the argument and now superfluous
operation from elfNN_aarch64_size_stubs.

bfd/elfnn-aarch64.c
bfd/elfxx-aarch64.h
ld/emultempl/aarch64elf.em

index 7c38e37dcb739eb7a52336bbb49c3ae6137f8495..3703e483130e0194fd8bf6148d8437b58837b0c0 100644 (file)
@@ -5450,8 +5450,7 @@ elfNN_aarch64_size_stubs (bfd *output_bfd,
                          struct bfd_link_info *info,
                          bfd_signed_vma group_size,
                          asection * (*add_stub_section) (const char *,
-                                                         asection *),
-                         void (*layout_sections_again) (void))
+                                                         asection *))
 {
   bfd_size_type stub_group_size;
   bool stubs_always_before_branch;
@@ -5467,7 +5466,6 @@ elfNN_aarch64_size_stubs (bfd *output_bfd,
   /* Stash our params away.  */
   htab->stub_bfd = stub_bfd;
   htab->add_stub_section = add_stub_section;
-  htab->layout_sections_again = layout_sections_again;
   stubs_always_before_branch = group_size < 0;
   if (group_size < 0)
     stub_group_size = -group_size;
index 616d5fd45c42dd221c402c032a82217749ecee54..5373823a205a9753f8ddbe34eac8914cd041d187 100644 (file)
@@ -80,8 +80,7 @@ extern void elf64_aarch64_next_input_section
   (struct bfd_link_info *, struct bfd_section *);
 extern bool elf64_aarch64_size_stubs
   (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
-   struct bfd_section * (*) (const char *, struct bfd_section *),
-   void (*) (void));
+   struct bfd_section * (*) (const char *, struct bfd_section *));
 
 extern void elf64_c64_resize_sections (bfd *, struct bfd_link_info *,
                                       void (*) (asection *, bfd_vma),
@@ -96,8 +95,7 @@ extern void elf32_aarch64_next_input_section
   (struct bfd_link_info *, struct bfd_section *);
 extern bool elf32_aarch64_size_stubs
   (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
-   struct bfd_section * (*) (const char *, struct bfd_section *),
-   void (*) (void));
+   struct bfd_section * (*) (const char *, struct bfd_section *));
 extern bool elf32_aarch64_build_stubs
   (struct bfd_link_info *);
 
index e5ba012d08b8b6eb050764b6f188d44cd1312f9e..c68589d12c79203c3a7cb3e835f1042527fc6dc1 100644 (file)
@@ -78,7 +78,7 @@ aarch64_elf_before_allocation (void)
 /* Fake input file for stubs.  */
 static lang_input_statement_type *stub_file;
 
-/* Whether we need to call gldarm_layout_sections_again.  */
+/* Whether we need to call gldaarch64_layout_sections_again.  */
 static int need_laying_out = 0;
 
 /* Maximum size of a group of input sections that can be handled by
@@ -303,8 +303,7 @@ gld${EMULATION_NAME}_after_allocation (void)
                                          stub_file->the_bfd,
                                          & link_info,
                                          group_size,
-                                         & elf${ELFSIZE}_aarch64_add_stub_section,
-                                         & gldaarch64_layout_sections_again))
+                                         & elf${ELFSIZE}_aarch64_add_stub_section))
            {
              einfo (_("%X%P: can not size stub section: %E\n"));
              return;