On 18.03.2025 18:35, Roger Pau Monne wrote: > It's unclear why -N is being used in the first place. It was added by > commit 40828c657dd0c back in 2004 without any justification.
Not really, no. That only moved it from LDFLAGS to an explicit use. Several hops earlier it looks to be 4676bbf96dc8 (from 2002) where it was introduced, when the linker script also first appeared. > When building a PE image it's actually detrimental to forcefully set the > .text section as writable. The GNU LD man page contains the following > warning regarding the -N option: > >> Note: Although a writable text section is allowed for PE-COFF targets, it >> does not conform to the format specification published by Microsoft. There's also "Also, do not page-align the data segment, and disable linking against shared libraries." None of this should be relevant with a script either, so just to have mentioned it. > Remove the usage of -N uniformly on all architectures, assuming that the > addition was simply done as a copy and paste of the original x86 linking > rune. > > Signed-off-by: Roger Pau Monné <roger....@citrix.com> With the commit ref corrected: Reviewed-by: Jan Beulich <jbeul...@suse.com> Jan