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:
The HI16/LO16 relocations aren't supported and aren't applied.
Even though the relocation table states that the MIPS_26 relocations are applied, we can see that the thunks are not created and the function calls are incorrect.
After this patch, both of these issues are fixed, and the correct thunks are created and referenced by the listing.
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:
After this patch, both of these issues are fixed, and the correct thunks are created and referenced by the listing.