@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
=@@@@
@@@@
@@@@
@@@@ @@@@
@@@@ @@@@@
@@@@@ @@@@@
@@@@@ @@@@@
:@@@@ *@@@@
@@@@ :@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@= @@@@
@`
[deroad's blog]
[home]
# 2014-01-14 | Reversing Wii U Executables
{
First thing to say, Wii U uses Executable and Linkable Format (ELF) with dynamic linking (since Wii U has a real OS), but they are different from the normal ones:
* Wii U libraries are called RPL
* Wii U executables are called RPX, but these are actually RPL
the only difference between RPX and RPL is that the first one has the main entry point, but both are ELFs.
ok, so this is what i understood about the header:
0xCAFE ELF header
typedef struct __cafe_elf {
uint8_t e_ident[0x10];
uint16_t e_type;
uint16_t e_machine;
uint32_t e_version;
uint32_t e_entry;
uint32_t e_phoff;
uint32_t e_shoff;
uint32_t e_flags;
uint16_t e_ehsize;
uint16_t e_phentsize;
uint16_t e_phnum;
uint16_t e_shentsize;
uint16_t e_shnum;
uint16_t e_shstrndx;
uint8_t _pad[0xC];
uint8_t zero[0x28];
uint32_t one_0;
uint32_t one_1;
} cafe_elf;
0xCAFE ELF section table
typedef struct __cafe_elf_section_tbl {
uint32_t flags;
uint32_t address;
uint32_t offset;
uint32_t size;
uint32_t data0;
uint32_t data1;
uint32_t align;
uint32_t data3;
uint32_t data4;
uint32_t data5;
} cafe_elf_section_tbl;
0xCAFE ELF section data table
each section is compressed through zlib and has this structure:
typedef struct __cafe_elf_section_data {
uint32_t decompressed_size;
uint16_t zlib_compression_hdr;
uint8_t data[];
} cafe_elf_section_data_tbl;
}