aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorMark Harmstone <mark@harmstone.com>2023-01-24 00:52:30 +0000
committerMark Harmstone <mark@harmstone.com>2023-01-24 00:54:45 +0000
commit7ebf464bbd5099a10189c9b3935bff64ddcf5ca8 (patch)
tree7fcc86de991a138476216660d7b2591dbbeea609 /ld
parent844be75db5f7ea67a269370c400e6db1376aac05 (diff)
downloadgdb-7ebf464bbd5099a10189c9b3935bff64ddcf5ca8.zip
gdb-7ebf464bbd5099a10189c9b3935bff64ddcf5ca8.tar.gz
gdb-7ebf464bbd5099a10189c9b3935bff64ddcf5ca8.tar.bz2
ld: Avoid magic numbers for subsystems in pe.em and pep.em
Diffstat (limited to 'ld')
-rw-r--r--ld/emultempl/pe.em8
-rw-r--r--ld/emultempl/pep.em4
2 files changed, 6 insertions, 6 deletions
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index 0354c56..7e1866a 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -131,7 +131,7 @@ fragment <<EOF
| IMAGE_DLL_CHARACTERISTICS_NX_COMPAT)
#if defined(TARGET_IS_i386pe) || ! defined(DLL_SUPPORT)
-#define PE_DEF_SUBSYSTEM 3
+#define PE_DEF_SUBSYSTEM IMAGE_SUBSYSTEM_WINDOWS_CUI
#else
#undef NT_EXE_IMAGE_BASE
#undef PE_DEF_SECTION_ALIGNMENT
@@ -140,13 +140,13 @@ fragment <<EOF
#if defined(TARGET_IS_armpe)
#define PE_DEF_SECTION_ALIGNMENT 0x00001000
-#define PE_DEF_SUBSYSTEM 2
+#define PE_DEF_SUBSYSTEM IMAGE_SUBSYSTEM_WINDOWS_GUI
#elif defined(TARGET_IS_arm_wince_pe)
#define PE_DEF_SECTION_ALIGNMENT 0x00001000
-#define PE_DEF_SUBSYSTEM 9
+#define PE_DEF_SUBSYSTEM IMAGE_SUBSYSTEM_WINDOWS_CE_GUI
#else
#define PE_DEF_SECTION_ALIGNMENT 0x00000400
-#define PE_DEF_SUBSYSTEM 2
+#define PE_DEF_SUBSYSTEM IMAGE_SUBSYSTEM_WINDOWS_GUI
#endif
#define PE_DEF_FILE_ALIGNMENT 0x00000200
#endif
diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em
index 0bdac8f..5a53ab3 100644
--- a/ld/emultempl/pep.em
+++ b/ld/emultempl/pep.em
@@ -131,7 +131,7 @@ fragment <<EOF
| IMAGE_DLL_CHARACTERISTICS_NX_COMPAT)
#if defined(TARGET_IS_i386pep) || defined(COFF_WITH_peAArch64) || ! defined(DLL_SUPPORT)
-#define PE_DEF_SUBSYSTEM 3
+#define PE_DEF_SUBSYSTEM IMAGE_SUBSYSTEM_WINDOWS_CUI
#undef NT_EXE_IMAGE_BASE
#define NT_EXE_IMAGE_BASE \
((bfd_vma) (${move_default_addr_high} ? 0x100400000LL \
@@ -166,7 +166,7 @@ fragment <<EOF
((bfd_vma) (${move_default_addr_high} ? 0x0ffff0000LL \
: 0x0ffc0000LL))
#undef PE_DEF_SECTION_ALIGNMENT
-#define PE_DEF_SUBSYSTEM 2
+#define PE_DEF_SUBSYSTEM IMAGE_SUBSYSTEM_WINDOWS_GUI
#undef PE_DEF_FILE_ALIGNMENT
#define PE_DEF_FILE_ALIGNMENT 0x00000200
#define PE_DEF_SECTION_ALIGNMENT 0x00000400