aboutsummaryrefslogtreecommitdiff
path: root/bfd/coffcode.h
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/coffcode.h')
-rw-r--r--bfd/coffcode.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index d5d9153..86e9561 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -2221,6 +2221,12 @@ coff_set_arch_mach_hook (bfd *abfd, void * filehdr)
}
break;
#endif
+#ifdef AARCH64MAGIC
+ case AARCH64MAGIC:
+ arch = bfd_arch_aarch64;
+ machine = internal_f->f_flags & F_AARCH64_ARCHITECTURE_MASK;
+ break;
+#endif
#ifdef Z80MAGIC
case Z80MAGIC:
arch = bfd_arch_z80;
@@ -2777,6 +2783,12 @@ coff_set_flags (bfd * abfd,
return true;
#endif
+#ifdef AARCH64MAGIC
+ case bfd_arch_aarch64:
+ * magicp = AARCH64MAGIC;
+ return true;
+#endif
+
#ifdef ARMMAGIC
case bfd_arch_arm:
#ifdef ARM_WINCE
@@ -3872,7 +3884,7 @@ coff_write_object_contents (bfd * abfd)
internal_f.f_flags |= IMAGE_FILE_LARGE_ADDRESS_AWARE;
#endif
-#ifndef COFF_WITH_pex64
+#if !defined(COFF_WITH_pex64) && !defined(COFF_WITH_peAArch64)
#ifdef COFF_WITH_PE
internal_f.f_flags |= IMAGE_FILE_32BIT_MACHINE;
#else
@@ -3921,6 +3933,11 @@ coff_write_object_contents (bfd * abfd)
internal_a.magic = ZMAGIC;
#endif
+#if defined(AARCH64)
+#define __A_MAGIC_SET__
+ internal_a.magic = ZMAGIC;
+#endif
+
#if defined MCORE_PE
#define __A_MAGIC_SET__
internal_a.magic = IMAGE_NT_OPTIONAL_HDR_MAGIC;