mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-27 08:12:44 +00:00
* Fix r_bin_elf for ppc, avr and 68k binaries
This commit is contained in:
parent
afb634f97d
commit
c6b37c3e26
1
TODO
1
TODO
@ -71,7 +71,6 @@ nibble
|
||||
|
||||
Assembler
|
||||
---------
|
||||
* add ppc64 disassembler (earada)
|
||||
* Embed bits/arch/endian in a separated structure
|
||||
- So one can change from one arch to another with a pointer
|
||||
- Cool for defining ranges of memory
|
||||
|
@ -284,6 +284,10 @@ char* Elf_(r_bin_elf_get_data_encoding)(struct Elf_(r_bin_elf_obj_t) *bin) {
|
||||
|
||||
char* Elf_(r_bin_elf_get_arch)(struct Elf_(r_bin_elf_obj_t) *bin) {
|
||||
switch (bin->ehdr.e_machine) {
|
||||
case EM_AVR:
|
||||
return strdup ("avr");
|
||||
case EM_68K:
|
||||
return strdup ("m68k");
|
||||
case EM_MIPS:
|
||||
case EM_MIPS_RS3_LE:
|
||||
case EM_MIPS_X:
|
||||
@ -296,7 +300,7 @@ char* Elf_(r_bin_elf_get_arch)(struct Elf_(r_bin_elf_obj_t) *bin) {
|
||||
return strdup ("sparc");
|
||||
case EM_PPC:
|
||||
case EM_PPC64:
|
||||
return strdup ("powerpc");
|
||||
return strdup ("ppc");
|
||||
case EM_68K:
|
||||
return strdup ("m68k");
|
||||
default:
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* radare - GPL3 - Copyright 2009-2010 nibble<.ds@gmail.com> */
|
||||
/* radare - LGPL3 - Copyright 2009-2011 nibble<.ds@gmail.com> */
|
||||
|
||||
#include <r_types.h>
|
||||
#include <r_util.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user