diff options
author | Matthew Malcomson <matthew.malcomson@arm.com> | 2022-08-05 17:19:35 +0100 |
---|---|---|
committer | Matthew Malcomson <matthew.malcomson@arm.com> | 2022-08-05 17:50:11 +0100 |
commit | a062272c6f194d17a7de41ba4f79d0fd49c67781 (patch) | |
tree | 93d7bd47998f5add3bc63061ca5a9b455dda99d1 | |
parent | ece841e87abc8c8967e0b815aee82030620df3ca (diff) | |
download | binutils-gdb-a062272c6f194d17a7de41ba4f79d0fd49c67781.tar.gz |
Remove layout_sections_again argument to size_stubs
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.
-rw-r--r-- | bfd/elfnn-aarch64.c | 4 | ||||
-rw-r--r-- | bfd/elfxx-aarch64.h | 6 | ||||
-rw-r--r-- | ld/emultempl/aarch64elf.em | 5 |
3 files changed, 5 insertions, 10 deletions
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index ac357c4fa82..446a9af70f9 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -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; diff --git a/bfd/elfxx-aarch64.h b/bfd/elfxx-aarch64.h index c9fc01bc717..86b5ed2de37 100644 --- a/bfd/elfxx-aarch64.h +++ b/bfd/elfxx-aarch64.h @@ -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 *); diff --git a/ld/emultempl/aarch64elf.em b/ld/emultempl/aarch64elf.em index 11512a127db..df4d33f3ab4 100644 --- a/ld/emultempl/aarch64elf.em +++ b/ld/emultempl/aarch64elf.em @@ -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; |