https://sourceware.org/bugzilla/show_bug.cgi?id=32732
Jan Beulich <jbeulich at suse dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2025-03-10 CC| |jbeulich at suse dot com --- Comment #2 from Jan Beulich <jbeulich at suse dot com> --- In the course of trying to adapt the testcase that the original patch added, to fit the (vaguely) change proposed in https://sourceware.org/pipermail/binutils/2025-March/139831.html I came to wonder what the original purpose of that change was: --section-alignment, like several other command line options controlling pe_* variables, is imo supposed to affect PE binaries only. Object files should be left alone. This can perhaps be seen even more prominently by the odd side effect --subsystem has on object files (for certain option arguments) with the original change in place. That option yet more clearly ought to be entirely benign to object files (and we may even want to warn about use of such options on object files). For executables, however, playing with section alignment is pointless, as section alignment is deliberately omitted from section table entries there (as of Alan's 6f8f6017a0c4 ["PR27567, Linking PE files adds alignment section flags to executables"]). Furthermore --set-section-alignment is what is (aiui) supposed to be used when trying to control alignment of sections in an object file. (I have a patch to enable the binutils-all/set-section-alignment test for COFF as well, but I first need to see how well it fares over a fuller range of targets.) Therefore my question is: Shouldn't we revert the non-auxiliary part of that change (and even backport that to at least 2.44)? Or at least, extending the patch sent to Bastian, also drop the inner if() from the conditional in question? Orthogonal to the issue here, but an observation while looking at that change in detail: In the VMA and LMA checks added, why is it "alignment != bfd_section_alignment (isection)" rather than "alignment > bfd_section_alignment (isection)"? Reducing alignment, after all, isn't going to break a section that was already misaligned. -- You are receiving this mail because: You are on the CC list for the bug.