lab313ru / ghidra_psx_ldr

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

Syscalls don't have the correct signatures #47

Closed IvanDSM closed 2 years ago

IvanDSM commented 3 years ago

I've noticed that as of the latest update ghidra_psx_ldr is identifying the syscalls, but it seems like they don't always have the correct signatures. B0:36, for example, is set to void FileClose(void), when it should be set to the Unix-style syscall int close(int fd). I've been using this document to correct syscalls signatures. Is it feasible to correct this behavior?

Thanks again for the excellent work on this extension!

IvanDSM commented 3 years ago

Also, I'll willing to try my hand at working on a PR if pointed in the right direction :)

lab313ru commented 3 years ago

In the last release I fixed things related to the signature applying, so the signatures from PsyQ libs now have collisions with syscall names from the XML here: https://github.com/lab313ru/ghidra_psx_ldr/blob/master/data/patterns/r3000_LE_patterns.xml

To fix that behavior you must change names of syscalls here: https://github.com/lab313ru/psx_psyq_signatures for every PsyQ version (maybe by just search and replace). Then, sure feel free to make a PR.

lab313ru commented 3 years ago

Or wrong names are only in that xml?