* Fix r_bin_elf for ppc, avr and 68k binaries

This commit is contained in:
pancake 2011-01-23 18:32:58 +01:00
parent afb634f97d
commit c6b37c3e26
3 changed files with 6 additions and 3 deletions

1
TODO
View File

@ -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

View File

@ -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:

View File

@ -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>