Support HEXAGON cpu type in ELF

This commit is contained in:
pancake 2017-06-07 11:06:23 +02:00
parent 2cc456fc76
commit 87ba2bb95f
3 changed files with 6 additions and 3 deletions

View File

@ -1799,6 +1799,8 @@ char* Elf_(r_bin_elf_get_arch)(ELFOBJ *bin) {
case EM_ARM:
case EM_AARCH64:
return strdup ("arm");
case EM_HEXAGON:
return strdup ("hexagon");
case EM_BLACKFIN:
return strdup ("blackfin");
case EM_SPARC:

View File

@ -252,6 +252,7 @@ typedef struct
#define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */
#define EM_XTENSA 94 /* Tensilica Xtensa Architecture */
#define EM_ALTERA_NIOS2 113 /* Altera Nios II */
#define EM_HEXAGON 164 /* Hexagon / QDSP6 baseband cpu */
#define EM_AARCH64 183 /* ARM AARCH64 */
#define EM_TILEPRO 188 /* Tilera TILEPro */
#define EM_MICROBLAZE 189 /* Xilinx MicroBlaze */

View File

@ -1,4 +1,4 @@
/* radare2 - LGPL - Copyright 2015-2016 - pancake */
/* radare2 - LGPL - Copyright 2015-2017 - pancake */
#include <r_types.h>
#include <r_util.h>
@ -176,7 +176,7 @@ static ut64 size(RBinFile *arch) {
return sizeof (SBLHDR) + sb.psize;
}
struct r_bin_plugin_t r_bin_plugin_mbn = {
RBinPlugin r_bin_plugin_mbn = {
.name = "mbn",
.desc = "MBN/SBL bootloader things",
.license = "LGPL3",
@ -193,7 +193,7 @@ struct r_bin_plugin_t r_bin_plugin_mbn = {
};
#ifndef CORELIB
struct r_lib_struct_t radare_plugin = {
RLibStruct radare_plugin = {
.type = R_LIB_TYPE_BIN,
.data = &r_bin_plugin_mbn,
.version = R2_VERSION