]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
RELOC_AGAINST_DISCARDED_SECTION zero size reloc sections
authorAlan Modra <amodra@gmail.com>
Thu, 17 Jul 2025 23:56:10 +0000 (09:26 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 18 Jul 2025 23:04:15 +0000 (08:34 +0930)
commit129cdfc16433bd755c81357bb2f665ca93edb0b4
treee1fd1ea11e48d004672a418b74136fb75cda9de4
parentcfbf9925c1c34f9e9d47c8b29d165866557663e3
RELOC_AGAINST_DISCARDED_SECTION zero size reloc sections

For some reason the initial implementation (commit 0672748ac053) of
this macro didn't allow discarding of all relocs in a section, perhaps
because doing so would require a testsuite change.  This patch allows
zero size relocation sections to result, and adjusts the testsuite.
i386, x86_64, ppc and ppc64 code that avoids a memmove is also changed
to allow zero size reloc sections, and arc fixed to actually adjust
the reloc section header.
bfd/elf-bfd.h
bfd/elf32-arc.c
bfd/elf32-i386.c
bfd/elf32-ppc.c
bfd/elf64-ppc.c
bfd/elf64-x86-64.c
ld/testsuite/ld-elf/linkonce1.d