aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
authorMark Harmstone <mark@harmstone.com>2023-01-05 02:36:32 +0000
committerMark Harmstone <mark@harmstone.com>2023-01-10 23:30:49 +0000
commit16fea92ccd993fce6b5b0efebe059d542cad9932 (patch)
tree59a1531c16963593e8b5d07f89b2525a0d00df3a /ld/emultempl
parent528e4f463f511b11ad414bc91bcf89c4fb53c352 (diff)
downloadgdb-16fea92ccd993fce6b5b0efebe059d542cad9932.zip
gdb-16fea92ccd993fce6b5b0efebe059d542cad9932.tar.gz
gdb-16fea92ccd993fce6b5b0efebe059d542cad9932.tar.bz2
Add aarch64-w64-mingw32 target
This adds a mingw target for aarch64, including windres and dlltool. Note that the old value of jmp_aarch64_bytes was wrong, and this does the same thing as MSVC does.
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/pep.em11
1 files changed, 7 insertions, 4 deletions
diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em
index 6ac70f9..f0e678b 100644
--- a/ld/emultempl/pep.em
+++ b/ld/emultempl/pep.em
@@ -121,7 +121,7 @@ fragment <<EOF
#define PE_DEF_SECTION_ALIGNMENT ${OVERRIDE_SECTION_ALIGNMENT}
#endif
-#ifdef TARGET_IS_i386pep
+#if defined(TARGET_IS_i386pep) || defined(COFF_WITH_peAArch64)
#define DLL_SUPPORT
#endif
@@ -130,7 +130,7 @@ fragment <<EOF
| IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA \
| IMAGE_DLL_CHARACTERISTICS_NX_COMPAT)
-#if defined(TARGET_IS_i386pep) || ! defined(DLL_SUPPORT)
+#if defined(TARGET_IS_i386pep) || defined(COFF_WITH_peAArch64) || ! defined(DLL_SUPPORT)
#define PE_DEF_SUBSYSTEM 3
#undef NT_EXE_IMAGE_BASE
#define NT_EXE_IMAGE_BASE \
@@ -1222,6 +1222,7 @@ make_import_fixup (arelent *rel, asection *s, char *name, const char *symname)
else if (suc)
_addend = bfd_get_16 (s->owner, addend);
break;
+ case 26:
case 32:
suc = bfd_get_section_contents (s->owner, s, addend, rel->address, 4);
if (suc && rel->howto->pc_relative)
@@ -1577,14 +1578,14 @@ gld${EMULATION_NAME}_after_open (void)
if (pep_enable_stdcall_fixup) /* -1=warn or 1=enable */
pep_fixup_stdcalls ();
-#ifndef TARGET_IS_i386pep
+#if !defined(TARGET_IS_i386pep) && !defined(COFF_WITH_peAArch64)
if (bfd_link_pic (&link_info))
#else
if (!bfd_link_relocatable (&link_info))
#endif
pep_dll_build_sections (link_info.output_bfd, &link_info);
-#ifndef TARGET_IS_i386pep
+#if !defined(TARGET_IS_i386pep) && !defined(COFF_WITH_peAArch64)
else
pep_exe_build_sections (link_info.output_bfd, &link_info);
#endif
@@ -1880,6 +1881,8 @@ gld${EMULATION_NAME}_recognized_file (lang_input_statement_type *entry ATTRIBUTE
#ifdef DLL_SUPPORT
#ifdef TARGET_IS_i386pep
pep_dll_id_target ("pei-x86-64");
+#elif defined(COFF_WITH_peAArch64)
+ pep_dll_id_target ("pei-aarch64-little");
#endif
if (pep_bfd_is_dll (entry->the_bfd))
return pep_implied_import_dll (entry->filename);