diff --git a/libr/bin/format/elf/elf.c b/libr/bin/format/elf/elf.c index 66496d386c..449ff7a0ae 100644 --- a/libr/bin/format/elf/elf.c +++ b/libr/bin/format/elf/elf.c @@ -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: diff --git a/libr/bin/format/elf/glibc_elf.h b/libr/bin/format/elf/glibc_elf.h index d55f6d4fa2..02a24d36f8 100644 --- a/libr/bin/format/elf/glibc_elf.h +++ b/libr/bin/format/elf/glibc_elf.h @@ -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 */ diff --git a/libr/bin/p/bin_mbn.c b/libr/bin/p/bin_mbn.c index 85af86b0a6..dc17c5f446 100644 --- a/libr/bin/p/bin_mbn.c +++ b/libr/bin/p/bin_mbn.c @@ -1,4 +1,4 @@ -/* radare2 - LGPL - Copyright 2015-2016 - pancake */ +/* radare2 - LGPL - Copyright 2015-2017 - pancake */ #include #include @@ -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