]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
objcopy: constrain --section-alignment to PE binaries again
authorJan Beulich <jbeulich@suse.com>
Fri, 4 Apr 2025 08:24:56 +0000 (10:24 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 4 Apr 2025 08:24:56 +0000 (10:24 +0200)
commit43ea7d00a76eb3a8e30aa91657e535f86e8658c4
treeaf1c171a556b7ca440936c2c332152f5d45bbc41
parentcc0693d394692261e03651325c9ae986ae579296
objcopy: constrain --section-alignment to PE binaries again

PR binutils/32732

The --set-section-alignment option is what ought to be used on object
files; --section-alignment should be affecting PE binaries only, and
only the value stored in the header. Sections don't individually have
alignment recorded there; see 6f8f6017a0c4 ("PR27567, Linking PE files
adds alignment section flags to executables").

Undo the core part of 121a3f4b4f4a ("Update objcopy's
--section-alignment option so that it sets the alignment flag on..."),
which includes removing the testcase again, while leaving all secondary
changes in place. (Note that the testcase did fail anyway for
i?86-interix, with objdump saying "option -P/--private not supported by
this file".)
binutils/doc/binutils.texi
binutils/objcopy.c
binutils/testsuite/binutils-all/objcopy.exp
binutils/testsuite/binutils-all/section-alignment.d [deleted file]