Add support for detecting Freescale S12Z binaries in readelf.
authorJohn Darrington <john@darrington.wattle.id.au>
Thu, 10 May 2018 11:51:42 +0000 (12:51 +0100)
committerNick Clifton <nickc@redhat.com>
Thu, 10 May 2018 11:51:42 +0000 (12:51 +0100)
* include/elf/common.h (EM_S12Z): New macro
* binutils/readelf.c (get_machine_name): EM_S12Z - handle new case.

binutils/ChangeLog
binutils/readelf.c
include/ChangeLog
include/elf/common.h

index 26601b927099dc7e2efc658f960fe9dc66e5c3c1..7235be257457cffac4761a46320dad92633edca9 100644 (file)
@@ -1,3 +1,7 @@
+2018-05-10  John Darrington  <john@darrington.wattle.id.au>
+
+       * readelf.c (get_machine_name): EM_S12Z - handle new case.
+
 2018-05-09  Alan Modra  <amodra@gmail.com>
 
        * od-macho.c (dump_unwind_encoding_x86): Fix typo in last patch.
index 0c676f2b228510d31d5781265f1a0f8be82bb172..6a9c51d4bb7db68441c1b630287fe285948a1bb8 100644 (file)
@@ -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), _("<unknown>: 0x%x"), e_machine);
index 3e74a7679f6369b34f2bdd3e4e0cf09cbca593ce..fde5031ddca88b5bdf078c7f1c806cb18afda705 100644 (file)
@@ -1,3 +1,7 @@
+2018-05-10  John Darrington  <john@darrington.wattle.id.au>
+
+       * elf/common.h (EM_S12Z): New macro.
+
 2018-05-09  Sebastian Rasmussen  <sebras@gmail.com>
 
        * mach-o/unwind.h (MACH_O_UNWIND_X86_64_RBP_FRAME_REGISTERS):
index ae4a7b2b61911ed3c7478b48c0e8d1fabba76a09..773f378fde1c25081b9176bd5aeeeb995b5958ec 100644 (file)
 /* 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