[PATCH 00/17] PE/COFF: .reloc handling

Jan Beulich jbeulich@suse.com
Mon Aug 4 09:11:51 GMT 2025


The main goal is to have a way to allow .reloc to not end up discardable
in the final binary, while still having that be the default. It is amazing
though how many other, seemingly unrelated patches are needed to actually
make the new testcases work across the board (and there's still the risk
that my already large set of tested targets still doesn't include some
which may require yet more adjustments). There are then also five largely
unrelated cleanup patches, potential for which was spotted while doing the
work (the latter extending what the first of them does).

01: ld/PE: adjust .reloc and .edata section flags
02: gas/COFF: extend use of SEC_ALLOC
03: bfd / PE/COFF: avoid setting SEC_ALLOC when finding IMAGE_SCN_MEM_DISCARDABLE
04: bfd/COFF: optionally pass BFD section into swap_scnhdr_out() hook
05: objdump: enable PE support for Interix
06: ld/PE: adjust pe_detail_list[]
07: ld/PE: respect --enable-reloc-section even when .reloc isn't created by default
08: gas/SH: support BFD_RELOC_RVA in the PE/COFF case
09: gas/SH: respect --no-pad-sections
10: bfd / PE/COFF / arm: permit SEC_READONLY
11: bfd / PE/COFF / sh: permit SEC_READONLY
12: bfd/PE: respect SEC_ALLOC when deciding whether to force IMAGE_SCN_MEM_DISCARDABLE
13: bfd/PE: make local array in _bfd_XXi_swap_scnhdr_out() static
14: bfd/ELF: make three local arrays static
15: bfd/ELF: make one local array static and several const
16: bfd/ELF/Arm: make various arrays static / const
17: bfd/ELF/PPC: make ppc_build_one_stub()'s stub_str[] static

Jan


More information about the Binutils mailing list