chaoticgd / ghidra-emotionengine-reloaded

An extension for Ghidra that adds support for the PlayStation 2.
Apache License 2.0
118 stars 11 forks source link

relocation: Piggyback on Ghidra's native MIPS relocation handler #50

Closed abelbriggs1 closed 8 months ago

abelbriggs1 commented 8 months ago

Ghidra's built-in MIPS relocation handler has support for all of the non-proprietary relocations we care about. Instead of rolling our own version or not supporting them, fall back to super.relocate() if the relocation type isn't custom.

This should fix several issues with relocations in unlinked ELF files. Here's an example of what happens currently:

image

After this patch, both of these issues are fixed, and the correct thunks are created and referenced by the listing.

image