]> xenbits.xensource.com Git - xen.git/commit
xen: remove -N from the linker command line
authorRoger Pau Monne <roger.pau@citrix.com>
Wed, 5 Mar 2025 10:53:20 +0000 (11:53 +0100)
committerRoger Pau Monne <roger.pau@citrix.com>
Wed, 23 Apr 2025 14:12:25 +0000 (16:12 +0200)
commitd444763f8ca556d0a67a4b933be303d346baef02
tree4c1c6255cb34e8f88af73a17c4ee02146b54c3f3
parent4aae4452efeee3d3bba092b875e37d1e7c8f6db9
xen: remove -N from the linker command line

It's unclear why -N is being used in the first place.  It was added by
commit 4676bbf96dc8 back in 2002 without any justification.

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.

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.pau@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Acked-by: Julien Grall <jgrall@amazon.com>
xen/arch/arm/Makefile
xen/arch/ppc/Makefile
xen/arch/riscv/Makefile
xen/arch/x86/Makefile