]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - bfd/elf64-hppa.c
PR 30569, always call elf_backend_size_dynamic_sections
authorAlan Modra <amodra@gmail.com>
Thu, 28 Mar 2024 08:55:42 +0000 (19:25 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 2 Apr 2024 00:02:04 +0000 (10:32 +1030)
commitaf969b14aedcc0ae27dcefab4327ff2d153dec8b
tree0798575242610edd85068427a07f486ee5750660
parentf37f8c46c2e876a524301d6916a04cf7debb6483
PR 30569, always call elf_backend_size_dynamic_sections

This largely mechanical patch is preparation for a followup patch.

For quite some time I've thought that it would be useful to call
elf_backend_size_dynamic_sections even when no dynamic objects are
seen by the linker.  That's what this patch does, with some renaming.
There are no functional changes to the linker, just a move of the
dynobj test in bfd_elf_size_dynamic_sections to target backend
functions, replacing the asserts/aborts already there.  No doubt some
of the current always_size_sections functions could be moved to
size_dynamic_sections but I haven't made that change.

Because both hooks are now always called, I have renamed
always_size_sections to early_size_sections and size_dynamic_sections
to late_size_sections.  I condisdered calling late_size_sections plain
size_sections, since this is the usual target dynamic section sizing
hook, but decided that searching the sources for "size_sections" would
then hit early_size_sections and other functions.
61 files changed:
bfd/elf-bfd.h
bfd/elf-m10300.c
bfd/elf32-arc.c
bfd/elf32-arm.c
bfd/elf32-bfin.c
bfd/elf32-cr16.c
bfd/elf32-cris.c
bfd/elf32-csky.c
bfd/elf32-frv.c
bfd/elf32-hppa.c
bfd/elf32-i386.c
bfd/elf32-lm32.c
bfd/elf32-m32c.c
bfd/elf32-m32r.c
bfd/elf32-m68k.c
bfd/elf32-metag.c
bfd/elf32-microblaze.c
bfd/elf32-mips.c
bfd/elf32-nds32.c
bfd/elf32-nios2.c
bfd/elf32-or1k.c
bfd/elf32-ppc.c
bfd/elf32-rl78.c
bfd/elf32-s390.c
bfd/elf32-score.c
bfd/elf32-score.h
bfd/elf32-score7.c
bfd/elf32-sh.c
bfd/elf32-sparc.c
bfd/elf32-tic6x.c
bfd/elf32-tilegx.c
bfd/elf32-tilepro.c
bfd/elf32-vax.c
bfd/elf32-xstormy16.c
bfd/elf32-xtensa.c
bfd/elf64-alpha.c
bfd/elf64-hppa.c
bfd/elf64-ia64-vms.c
bfd/elf64-mips.c
bfd/elf64-ppc.c
bfd/elf64-s390.c
bfd/elf64-sparc.c
bfd/elf64-tilegx.c
bfd/elf64-x86-64.c
bfd/elflink.c
bfd/elfn32-mips.c
bfd/elfnn-aarch64.c
bfd/elfnn-ia64.c
bfd/elfnn-kvx.c
bfd/elfnn-loongarch.c
bfd/elfnn-riscv.c
bfd/elfxx-mips.c
bfd/elfxx-mips.h
bfd/elfxx-sparc.c
bfd/elfxx-sparc.h
bfd/elfxx-target.h
bfd/elfxx-tilegx.c
bfd/elfxx-tilegx.h
bfd/elfxx-x86.c
bfd/elfxx-x86.h
ld/emultempl/vms.em