lab313ru / ghidra_psx_ldr

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

More compiler segment generation fixes for unusual layouts. #75

Open Zinfidel opened 3 months ago

Zinfidel commented 3 months ago

I believe that this strange disconnect between the header information and seemingly the actual data layout for games is entirely due to small data optimization (gp) by the linker. However I will admit that I can't reconcile that with the fact that linker would be responsible for creating the header to begin with, and I'm not sure why PSYLINK.EXE would handle this situation like this.

As a closing note, I've made a lot of changes to the PSX loader on my own personal branch that I feel are too extensive and perhaps opinionated to make for a good PR, but for possible future bugs/features, my repo may have something already that could help. The MIPS-specific constant propagation analyzer in particular required altering the plugin's SLEIGH metadata to enable it, but it's a huge step up from the basic analyzer.