]> 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)
committerMatthew Malcomson <matthew.malcomson@arm.com>
Fri, 5 Aug 2022 16:50:11 +0000 (17:50 +0100)
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 ac357c4fa82c910892fe1c46a91f173883c19df8..446a9af70f9fac3f6648a069e74b3f17777ecdce 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;
   bfd_boolean 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 c9fc01bc71736f4e9f1026a618805178b4bac1ab..86b5ed2de3702dca3e071260132da00aba81efab 100644 (file)
@@ -80,8 +80,7 @@ extern void elf64_aarch64_next_input_section
   (struct bfd_link_info *, struct bfd_section *);
 extern bfd_boolean 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 bfd_boolean 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 bfd_boolean elf32_aarch64_build_stubs
   (struct bfd_link_info *);
 
index 11512a127db039066f6c11e6132f7089d0528994..df4d33f3ab4fb383057df7118dd271517f139509 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;