kotcrab / ghidra-allegrex

Ghidra processor module adding support for the Allegrex CPU (PSP)
Apache License 2.0
91 stars 9 forks source link

Broken relocation in Pop'n_Music_Portable (Japanese) #25

Closed Nemoumbra closed 1 year ago

Nemoumbra commented 1 year ago

For some reason the Image base parameter is 0000000 when I load the Eboot.bin binary. This is not fatal, but I think it causes Ghidra to assume that a lot of functions reference the data (when, in fact, they reference the code) => the analyzer creates the data in the middle of the code segments so when the time comes to disassemble the region, it fails. I ended up with lots of partially disassembled funcs which no one can work with. You have to manually clear the data, then disassemble again, then recreate the function again. Setting up the base to 0x08804000 doesn't help as now it breaks the calls: image I say something is wrong with the way someone handles relocation. My initial guess is that I should check if this plugin is to blame. I'd like to know what can be done with this.

kotcrab commented 1 year ago

Sounds like a bug in the plugin. I'll check it.

kotcrab commented 1 year ago

Confirmed this is unsupported case where relocation info is not in the section header but in the program header. Hopefully it will be easy to add if format and processing is the same.