From: John Darrington Date: Thu, 10 May 2018 11:51:42 +0000 (+0100) Subject: Add support for detecting Freescale S12Z binaries in readelf. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=637b19704cf8325875de8df4f8b000197d261e3b;p=binutils-gdb.git Add support for detecting Freescale S12Z binaries in readelf. * include/elf/common.h (EM_S12Z): New macro * binutils/readelf.c (get_machine_name): EM_S12Z - handle new case. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 26601b92709..7235be25745 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2018-05-10 John Darrington + + * readelf.c (get_machine_name): EM_S12Z - handle new case. + 2018-05-09 Alan Modra * od-macho.c (dump_unwind_encoding_x86): Fix typo in last patch. diff --git a/binutils/readelf.c b/binutils/readelf.c index 0c676f2b228..6a9c51d4bb7 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -2495,6 +2495,7 @@ get_machine_name (unsigned e_machine) case EM_CYGNUS_MEP: return "Toshiba MeP Media Engine"; case EM_ADAPTEVA_EPIPHANY: return "Adapteva EPIPHANY"; case EM_CYGNUS_FRV: return "Fujitsu FR-V"; + case EM_S12Z: return "Freescale S12Z"; default: snprintf (buff, sizeof (buff), _(": 0x%x"), e_machine); diff --git a/include/ChangeLog b/include/ChangeLog index 3e74a7679f6..fde5031ddca 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2018-05-10 John Darrington + + * elf/common.h (EM_S12Z): New macro. + 2018-05-09 Sebastian Rasmussen * mach-o/unwind.h (MACH_O_UNWIND_X86_64_RBP_FRAME_REGISTERS): diff --git a/include/elf/common.h b/include/elf/common.h index ae4a7b2b619..773f378fde1 100644 --- a/include/elf/common.h +++ b/include/elf/common.h @@ -368,6 +368,9 @@ /* Unofficial value for Web Assembly binaries, as used by LLVM. */ #define EM_WEBASSEMBLY 0x4157 +/* Freescale S12Z. The Freescale toolchain generates elf files with this value. */ +#define EM_S12Z 0x4DEF + /* DLX magic number. Written in the absense of an ABI. */ #define EM_DLX 0x5aa5