Difference between revisions of "Ghidra"

From WiiBrew
Jump to navigation Jump to search
m (Fixed some capitalization.)
(Link work in progress DSP processor spec)
(One intermediate revision by one other user not shown)
Line 24: Line 24:
A [https://github.com/Pokechu22/ghidra-mn102-lang/ MN102 processor spec] exists.
A [https://github.com/Pokechu22/ghidra-mn102-lang/ MN102 processor spec] exists.
== Use with [[Hardware/DSP|DSP]] microcode ==
A [https://github.com/Pokechu22/ghidra-gcdsp-lang/ work in progress processor spec] exists.
== External Links ==
* [https://github.com/Cuyler36/Ghidra-GameCube-Loader Ghidra-GameCube-Loader]
* [https://github.com/aldelaro5/ghidra-gekko-broadway-lang ghidra-gekko-broadway-lang]

Latest revision as of 07:55, 14 July 2021

Ghidra Logo.png
Author(s)National Security Agency
TypePC utility
LicenceApache + Public Domain

Ghidra is a FOSS reverse-engineering tool by the US National Security Agency. It includes a disassembler and a decompiler.

Use with GameCube/Wii games

Ghidra does not include a GameCube loader by default, nor does it understand Broadway's slightly extended instruction set featuring paired singles. However, this can be fixed by installing ghidra-gekko-broadway-lang and Ghidra-GameCube-Loader. After these are installed, DOL and REL files can be imported using the normal import system. To extract those files from a disc image, one option is to open the properties for the disc in Dolphin, go to the filesystem tab, right-click, and select "Extract System Data" (or "Extract Entire Disc"/"Extract Entire Partition"). If a game includes debug symbols, then those can also be imported. When importing an ELF file, make sure to select the Gekko/Broadway PowerPC variant (which is selected by default for DOL and REL files).

Use with IOS

Ghidra can naturally import some IOS ARM Binaries, specifically those that are just regular ELF files. However, it will produce bad results due to the use of undefined instructions for syscalls. A language definition exists to fix this (though it will not produce the cleanest results since it doesn't know what various registers are used/changed by each syscall). For ELFLOADER files (used for monolithic IOS versions, and the kernel in non-monolithic IOS versions), the file must be converted to a normal ELF file first (by removing everything before the ELF header, or using the program on the ARM Binaries page).

There is also a functionID database available to help disassemble an IOS kernel in Ghidra. It can be found here.

Use with Disc Drive firmware

A MN102 processor spec exists.

Use with DSP microcode

A work in progress processor spec exists.

External Links