]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
bfd/ELF: restrict file alignment for object files
authorJan Beulich <jbeulich@suse.com>
Fri, 11 Oct 2024 06:19:34 +0000 (08:19 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 11 Oct 2024 06:19:34 +0000 (08:19 +0200)
commit1f1b5e506bf0d9bffef8525eb9bee19646713eb6
tree0e7ff853c88a222cadaa41603f2f8594318aff63
parent873e7b6cf61b5e3fca8ab55ea1b8574dd00a3caf
bfd/ELF: restrict file alignment for object files

While for executables properly aligning sections within the file can be
quite relevant, the same is of pretty little importance for relocatable
object files. Avoid passing "true" into
_bfd_elf_assign_file_position_for_section() when dealing with object
files, but compensate minimally by applying log_file_align in such
cases as a cap to the alignment put in place.
12 files changed:
bfd/elf-bfd.h
bfd/elf.c
bfd/elflink.c
binutils/testsuite/binutils-all/i386/compressed-1b.d
binutils/testsuite/binutils-all/i386/compressed-1c.d
binutils/testsuite/binutils-all/readelf.s
gas/testsuite/gas/aarch64/tail_padding.d
gas/testsuite/gas/arm/ehabi-pacbti-m.d
gas/testsuite/gas/ia64/group-1.d
gas/testsuite/gas/ia64/group-2.d
gas/testsuite/gas/mmix/bspec-2.d
ld/testsuite/ld-x86-64/pr27590.rd