ld: Set default subsystem for arm-pe to IMAGE_SUBSYSTEM_WINDOWS_GUI
authorMark Harmstone <mark@harmstone.com>
Sun, 22 Jan 2023 23:45:03 +0000 (23:45 +0000)
committerMark Harmstone <mark@harmstone.com>
Mon, 23 Jan 2023 20:29:51 +0000 (20:29 +0000)
This fixes the test failures introduced by 87a5cf5c, by changing the
default subsystem for arm-pe from 9 (IMAGE_SUBSYSTEM_WINDOWS_CE_GUI) to
2 (IMAGE_SUBSYSTEM_WINDOWS_GUI), which matches what happens with other
PE targets.

As far as I can tell there's no working modern Windows CE toolchain
knocking about anyway, so this change shouldn't inconvenience anyone.

ld/emultempl/pe.em

index 0413d07d6c3f78738f62124db4480ab6f7c7afbc..0354c560fc7d9f8084444a99ac67baa34b58bb13 100644 (file)
@@ -138,7 +138,10 @@ fragment <<EOF
 #undef PE_DEF_FILE_ALIGNMENT
 #define NT_EXE_IMAGE_BASE              0x00010000
 
-#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_wince_pe)
+#if defined(TARGET_IS_armpe)
+#define PE_DEF_SECTION_ALIGNMENT       0x00001000
+#define        PE_DEF_SUBSYSTEM                2
+#elif defined(TARGET_IS_arm_wince_pe)
 #define PE_DEF_SECTION_ALIGNMENT       0x00001000
 #define        PE_DEF_SUBSYSTEM                9
 #else