Rename Binutils patchdir.

This commit is contained in:
2020-08-16 21:04:40 +02:00
parent 6a44f74ff8
commit 7c0e0b3a53
3 changed files with 1 additions and 1 deletions

View File

@@ -0,0 +1,126 @@
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
index 5149ef582b..f09e4b7382 100644
--- a/bfd/peXXigen.c
+++ b/bfd/peXXigen.c
@@ -2952,6 +2952,25 @@ _bfd_XX_print_private_bfd_data_common (bfd * abfd, void * vfile)
case IMAGE_SUBSYSTEM_XBOX:
subsystem_name = "XBOX";
break;
+ /* These are the XT specific subsystems */
+ case IMAGE_SUBSYSTEM_XT_DRIVER:
+ subsystem_name = "XT driver";
+ break;
+ case IMAGE_SUBSYSTEM_XT_NATIVE:
+ subsystem_name = "XT native";
+ break;
+ case IMAGE_SUBSYSTEM_XT_GDIAPP:
+ subsystem_name = "XT GDI application";
+ break;
+ case IMAGE_SUBSYSTEM_XT_CLIAPP:
+ subsystem_name = "XT CLI application";
+ break;
+ case IMAGE_SUBSYSTEM_XT_PSXAPP:
+ subsystem_name = "XT PSX application";
+ break;
+ case IMAGE_SUBSYSTEM_XT_DYNLIB:
+ subsystem_name = "XT dynamic library"
+ break;
/* Added default case for clarity - subsystem_name is NULL anyway. */
default:
subsystem_name = NULL;
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index 3866c7f458..55e069831b 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -4860,7 +4860,13 @@ set_pe_subsystem (const char *s)
{ "efi-bsd", 1, IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER },
{ "efi-rtd", 1, IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER },
{ "sal-rtd", 1, IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER },
- { "xbox", 0, IMAGE_SUBSYSTEM_XBOX }
+ { "xbox", 0, IMAGE_SUBSYSTEM_XBOX },
+ { "xt-driver", 0, IMAGE_SUBSYSTEM_XT_DRIVER },
+ { "xt-native", 0, IMAGE_SUBSYSTEM_XT_NATIVE },
+ { "xt-gdiapp", 0, IMAGE_SUBSYSTEM_XT_GDIAPP },
+ { "xt-cliapp", 0, IMAGE_SUBSYSTEM_XT_CLIAPP },
+ { "xt-psxapp", 0, IMAGE_SUBSYSTEM_XT_PSXAPP },
+ { "xt-dynlib", 0, IMAGE_SUBSYSTEM_XT_DYNLIB }
};
short value;
char *copy;
diff --git a/include/coff/pe.h b/include/coff/pe.h
index c83a958eee..deeea6b49a 100644
--- a/include/coff/pe.h
+++ b/include/coff/pe.h
@@ -169,6 +169,12 @@
#define IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12
#define IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER 13
#define IMAGE_SUBSYSTEM_XBOX 14
+#define IMAGE_SUBSYSTEM_XT_DRIVER 21
+#define IMAGE_SUBSYSTEM_XT_NATIVE 22
+#define IMAGE_SUBSYSTEM_XT_GDIAPP 23
+#define IMAGE_SUBSYSTEM_XT_CLIAPP 24
+#define IMAGE_SUBSYSTEM_XT_PSXAPP 25
+#define IMAGE_SUBSYSTEM_XT_DYNLIB 26
/* NT allows long filenames, we want to accommodate this.
This may break some of the bfd functions. */
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index 3899c9d92c..c9277ded20 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -539,6 +539,12 @@ set_entry_point (void)
{ 7, "__PosixProcessStartup"},
{ 9, "WinMainCRTStartup" },
{14, "mainCRTStartup" },
+ {21, "XtDriverStartup" },
+ {22, "XtProcessStartup" },
+ {23, "XtgMainProcessStartup" },
+ {24, "XtcMainProcessStartup" },
+ {25, "XtpMainProcessStartup" },
+ {26, "XtlMainLibraryStartup" },
{ 0, NULL }
};
@@ -606,6 +611,12 @@ set_pe_subsystem (void)
{ "posix", 7},
{ "wince", 9},
{ "xbox", 14},
+ { "xt-driver", 21},
+ { "xt-native", 22},
+ { "xt-gdiapp", 23},
+ { "xt-cliapp", 24},
+ { "xt-psxapp", 25},
+ { "xt-dynlib", 26},
{ NULL, 0 }
};
diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em
index a0a7023e70..001aa34769 100644
--- a/ld/emultempl/pep.em
+++ b/ld/emultempl/pep.em
@@ -504,6 +504,12 @@ set_entry_point (void)
{ 7, "__PosixProcessStartup" },
{ 9, "WinMainCRTStartup" },
{14, "mainCRTStartup" },
+ {21, "XtDriverStartup" },
+ {22, "XtProcessStartup" },
+ {23, "XtgMainProcessStartup" },
+ {24, "XtcMainProcessStartup" },
+ {25, "XtpMainProcessStartup" },
+ {26, "XtlMainLibraryStartup" },
{ 0, NULL }
};
@@ -568,6 +573,12 @@ set_pep_subsystem (void)
{ "posix", 7 },
{ "wince", 9 },
{ "xbox", 14 },
+ { "xt-driver", 21},
+ { "xt-native", 22},
+ { "xt-gdiapp", 23},
+ { "xt-cliapp", 24},
+ { "xt-psxapp", 25},
+ { "xt-dynlib", 26},
{ NULL, 0 }
};

View File

@@ -0,0 +1,36 @@
Though GOLD is not yet enabled for TDM-GCC, this patch will help
From: J.M. Eubank <john@thesnappy.net>
From
<https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-binutils/0001-enable-gold-on.mingw32.patch>
---
0 files changed
diff --git a/configure b/configure
index 6a9719f6..f07a3b7f 100755
--- a/configure
+++ b/configure
@@ -3001,6 +3001,7 @@ case "${ENABLE_GOLD}" in
yes|default)
# Check for ELF target.
is_elf=no
+ is_pe=no
case "${target}" in
*-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \
| *-*-linux* | *-*-gnu* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \
@@ -3012,10 +3013,12 @@ case "${ENABLE_GOLD}" in
*)
is_elf=yes
;;
- esac
+ esac;;
+ *-*-mingw*)
+ is_pe=yes;;
esac
- if test "$is_elf" = "yes"; then
+ if test "$is_elf" = "yes" -o "$is_pe" = "yes"; then
# Check for target supported by gold.
case "${target}" in
i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-* \