aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
authorJedidiah Thompson <wej22007@outlook.com>2022-10-19 10:57:12 +0200
committerZac Walker <zac.walker@linaro.org>2022-10-19 10:57:12 +0200
commitc60b3806799abf1d7f6cf5108a1b0e733a950b13 (patch)
treea203af8ed31ff48618e57a76a668faea3673fb0e /ld/emultempl
parent740a19d914a83423122fe81eec9508fa1dbb0559 (diff)
downloadgdb-c60b3806799abf1d7f6cf5108a1b0e733a950b13.zip
gdb-c60b3806799abf1d7f6cf5108a1b0e733a950b13.tar.gz
gdb-c60b3806799abf1d7f6cf5108a1b0e733a950b13.tar.bz2
aarch64-pe support for LD, GAS and BFD
Allows aarch64-pe to be targeted natively, not having to use objcopy to convert it from ELF to PE. Based on initial work by Jedidiah Thompson Co-authored-by: Jedidiah Thompson <wej22007@outlook.com> Co-authored-by: Zac Walker <zac.walker@linaro.org>
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/pep.em10
1 files changed, 9 insertions, 1 deletions
diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em
index d94f18b..7a390e7 100644
--- a/ld/emultempl/pep.em
+++ b/ld/emultempl/pep.em
@@ -48,7 +48,11 @@ fragment <<EOF
#define COFF_IMAGE_WITH_PE
#define COFF_WITH_PE
+#ifdef TARGET_IS_aarch64pe
+#define COFF_WITH_peAArch64
+#elif defined (TARGET_IS_i386pep)
#define COFF_WITH_pex64
+#endif
#include "sysdep.h"
#include "bfd.h"
@@ -72,7 +76,11 @@ fragment <<EOF
/* FIXME: See bfd/peXXigen.c for why we include an architecture specific
header in generic PE code. */
-#include "coff/x86_64.h"
+#ifdef TARGET_IS_i386pep
+# include "coff/x86_64.h"
+#elif defined TARGET_IS_aarch64pe
+# include "coff/aarch64.h"
+#endif
#include "coff/pe.h"
/* FIXME: These are BFD internal header files, and we should not be