This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Mach-O, committed]: Add definition for arm64 cpu


On 26/03/14 15:10, Tristan Gingold wrote:
> Hi,
> 
> this patch just add the new Mach-O cpu id for arm64 (aarch64).
> 

I think the name used by binutils should be consistent: aarch64.  The
use of arm64 is going to be misleading.

R.

> 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;
> 
> 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]