[PATCH] ld: default the aarch64pe section alignment to 64K

trcrsired oyzawqgcfc@gmail.com
Thu Aug 13 17:17:37 GMT 2026


Windows on ARM64 is increasingly run on hosts with 16K pages
(Apple Silicon, Android).  A section alignment of 4K is not a
multiple of the host page size there, so the loader (or Wine)
cannot map the image.  Default the section alignment to 64K so
that images work everywhere, including under Wine on those hosts.
---
 ld/emulparams/aarch64pe.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ld/emulparams/aarch64pe.sh b/ld/emulparams/aarch64pe.sh
index 02bf02cd963..bffd6aea960 100644
--- a/ld/emulparams/aarch64pe.sh
+++ b/ld/emulparams/aarch64pe.sh
@@ -6,4 +6,8 @@ TEMPLATE_NAME=pep
 SUBSYSTEM=PE_DEF_SUBSYSTEM
 INITIAL_SYMBOL_CHAR=\"_\"
 TARGET_PAGE_SIZE=0x1000
+# Windows on ARM64 is increasingly run on systems with 16K pages
+# (Apple Silicon, Android).  Default the section alignment to 64K so
+# images work everywhere, including under Wine on those hosts.
+OVERRIDE_SECTION_ALIGNMENT=0x10000
 GENERATE_AUTO_IMPORT_SCRIPT=1
-- 
2.55.0



More information about the Binutils mailing list