diff --git a/binr/rabin2/rabin2.c b/binr/rabin2/rabin2.c index 40a0f8fbef..96121fd6dc 100644 --- a/binr/rabin2/rabin2.c +++ b/binr/rabin2/rabin2.c @@ -305,7 +305,6 @@ int main(int argc, char **argv) { RCoreBinFilter filter; const char *op = NULL; int c, bits = 0; - ut64 offset; RCore core; r_core_init (&core); @@ -475,7 +474,7 @@ int main(int argc, char **argv) { filter.offset = at; filter.name = name; - offset = r_bin_get_offset (bin); +// ut64 offset = r_bin_get_offset (bin); r_cons_new ()->is_interactive = R_FALSE; #define isradjson rad==R_CORE_BIN_JSON&&actions>1 diff --git a/libr/bin/format/elf/elf.c b/libr/bin/format/elf/elf.c index 85f4a4e93e..f9d45c2e62 100644 --- a/libr/bin/format/elf/elf.c +++ b/libr/bin/format/elf/elf.c @@ -426,6 +426,7 @@ char* Elf_(r_bin_elf_get_arch)(struct Elf_(r_bin_elf_obj_t) *bin) { case EM_MIPS_X: return strdup ("mips"); case EM_ARM: + case EM_AARCH64: return strdup ("arm"); case EM_SPARC: case EM_SPARC32PLUS: @@ -516,6 +517,7 @@ char* Elf_(r_bin_elf_get_machine_name)(struct Elf_(r_bin_elf_obj_t) *bin) { case EM_OPENRISC: return strdup ("OpenRISC 32-bit embedded processor"); case EM_ARC_A5: return strdup ("ARC Cores Tangent-A5"); case EM_XTENSA: return strdup ("Tensilica Xtensa Architecture"); + case EM_AARCH64: return strdup ("ARM aarch64"); default: return r_str_dup_printf (": 0x%x", bin->ehdr.e_machine); } } diff --git a/libr/bin/format/elf/elf_specs.h b/libr/bin/format/elf/elf_specs.h index 665698ec1d..1d05eab84a 100644 --- a/libr/bin/format/elf/elf_specs.h +++ b/libr/bin/format/elf/elf_specs.h @@ -285,6 +285,7 @@ typedef struct #define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */ #define EM_XTENSA 94 /* Tensilica Xtensa Architecture */ #define EM_NUM 95 +#define EM_AARCH64 183 /* ARMv8 */ /* If it is necessary to assign new unofficial EM_* values, please pick large random numbers (0x8523, 0xa7f2, etc.) to minimize the diff --git a/libr/util/str.c b/libr/util/str.c index e78b167c95..c40991dd3b 100644 --- a/libr/util/str.c +++ b/libr/util/str.c @@ -975,7 +975,7 @@ R_API char *r_str_uri_encode (const char *s) { // TODO: merge print inside rutil /* hack from print */ R_API int r_print_format_length (const char *fmt) { - int nargs, i, j, idx, times, otimes, endian; + int nargs, i, j, idx, times, endian; char *args, *bracket, tmp, last = 0; const char *arg = fmt; const char *argend = arg+strlen (fmt); @@ -985,7 +985,7 @@ R_API int r_print_format_length (const char *fmt) { while (*arg && iswhitechar (*arg)) arg++; /* get times */ - otimes = times = atoi (arg); + times = atoi (arg); if (times > 0) while ((*arg>='0'&&*arg<='9')) arg++; bracket = strchr (arg,'{'); @@ -1022,7 +1022,7 @@ R_API int r_print_format_length (const char *fmt) { /* go format */ i = 0; - if (!times) otimes = times = 1; + if (!times) times = 1; for (; times; times--) { // repeat N times const char * orig = arg; idx = 0;