public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [Mach-O, committed]: Add definition for arm64 cpu
@ 2014-03-26 15:10 Tristan Gingold
  2014-03-26 16:24 ` Richard Earnshaw
  0 siblings, 1 reply; 7+ messages in thread
From: Tristan Gingold @ 2014-03-26 15:10 UTC (permalink / raw)
  To: binutils@sourceware.org Development

Hi,

this patch just add the new Mach-O cpu id for arm64 (aarch64).

Committed on trunk.

Tristan.

include/mach-o/
        * loader.h (bfd_mach_o_cpu_type): Add BFD_MACH_O_CPU_TYPE_ARM64.

bfd/
        * mach-o.c (bfd_mach_o_convert_architecture): Add
        BFD_MACH_O_CPU_TYPE_ARM64.

binutils/
        * od-macho.c (bfd_mach_o_cpu_name): Add BFD_MACH_O_CPU_TYPE_ARM64.

diff --git a/bfd/mach-o.c b/bfd/mach-o.c
index c77520a..6237602 100644
--- a/bfd/mach-o.c
+++ b/bfd/mach-o.c
@@ -905,6 +905,10 @@ bfd_mach_o_convert_architecture (bfd_mach_o_cpu_type mtype,
       *type = bfd_arch_powerpc;
       *subtype = bfd_mach_ppc64;
       break;
+    case BFD_MACH_O_CPU_TYPE_ARM64:
+      *type = bfd_arch_aarch64;
+      *subtype = bfd_mach_aarch64;
+      break;
     default:
       *type = bfd_arch_unknown;
       break;
index 3cd2cf0..6f88112 100644
--- a/binutils/od-macho.c
+++ b/binutils/od-macho.c
@@ -99,6 +99,7 @@ static const bfd_mach_o_xlat_name bfd_mach_o_cpu_name[] =
   { "powerpc", BFD_MACH_O_CPU_TYPE_POWERPC },
   { "powerpc_64", BFD_MACH_O_CPU_TYPE_POWERPC_64 },
   { "x86_64", BFD_MACH_O_CPU_TYPE_X86_64 },
+  { "arm64", BFD_MACH_O_CPU_TYPE_ARM64 },
   { NULL, 0}
 };
 
diff --git a/include/mach-o/loader.h b/include/mach-o/loader.h
index f7b2b42..952346d 100644
--- a/include/mach-o/loader.h
+++ b/include/mach-o/loader.h
@@ -48,8 +48,12 @@ typedef enum bfd_mach_o_cpu_type
   BFD_MACH_O_CPU_TYPE_I860 = 15,
   BFD_MACH_O_CPU_TYPE_ALPHA = 16,
   BFD_MACH_O_CPU_TYPE_POWERPC = 18,
-  BFD_MACH_O_CPU_TYPE_POWERPC_64 = (BFD_MACH_O_CPU_TYPE_POWERPC | BFD_MACH_O_CPU_IS64BIT),
-  BFD_MACH_O_CPU_TYPE_X86_64 = (BFD_MACH_O_CPU_TYPE_I386 | BFD_MACH_O_CPU_IS64BIT)
+  BFD_MACH_O_CPU_TYPE_POWERPC_64 =
+    (BFD_MACH_O_CPU_TYPE_POWERPC | BFD_MACH_O_CPU_IS64BIT),
+  BFD_MACH_O_CPU_TYPE_X86_64 =
+    (BFD_MACH_O_CPU_TYPE_I386 | BFD_MACH_O_CPU_IS64BIT),
+  BFD_MACH_O_CPU_TYPE_ARM64 =
+    (BFD_MACH_O_CPU_TYPE_ARM | BFD_MACH_O_CPU_IS64BIT)
 }
 bfd_mach_o_cpu_type;

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-03-27  8:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-26 15:10 [Mach-O, committed]: Add definition for arm64 cpu Tristan Gingold
2014-03-26 16:24 ` Richard Earnshaw
2014-03-26 16:34   ` Tristan Gingold
2014-03-26 16:43     ` Marcus Shawcroft
2014-03-26 16:49       ` Richard Earnshaw
2014-03-27  8:18         ` Tristan Gingold
2014-03-27  8:22       ` Tristan Gingold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).