lab313ru / ghidra_psx_ldr

Sony Playstation PSX executables loader for GHIDRA
231 stars 31 forks source link

Fails to resolve global addresses in code which is not auto-analyzed. #50

Closed Kneesnap closed 2 years ago

Kneesnap commented 2 years ago

The game I'm working on has overlays, and because of the overlays, there are certain functions in the executable which are not detected as functions by Ghidra when initially loaded, because they are only referenced by overlays which are not loaded initially.

When I use the 'D' keybind to disassemble the data, ghidra_psx_loader does not seem to handle this properly, as the references to $gp are not turned into their global references, and instead are represented as "iGp" + the offset from $gp. This is quite annoying, as this requires manually looking up what data a particular piece of code is accessing.

Here's a good example: image

lab313ru commented 2 years ago

You can set up register values manually, by pressing Ctrl+R at a function start.

lab313ru commented 2 years ago

Fixed via: 59f46a0e4eeccbb307bf6f54263c76b0ae3d6535