Xeeynamo / sotn-decomp

Decompilation of Castlevania: Symphony of the Night (PSX+Saturn)
https://sotn.xee.dev/
GNU Affero General Public License v3.0
480 stars 55 forks source link

make-config can now cross-reference symbols across versions #1677

Closed Xeeynamo closed 1 day ago

Xeeynamo commented 1 day ago

Export the symbol list from the compiled elf and call splat split TARGET --disassemble-all, so symbols cross can correctly cross-reference the symbols.

Now there is also a warning when symbols cannot be cross-referenced correctly.

cc. @hohle I noticed this issue on your stream

Before:

$ tools/make-config.py --version hd cen
✔ generating psx splat config
✔ splitting config/splat.hd.stcen.yaml
✔ adjusting files at src/st/cen
✔ disassembling matched functions
✔ finding duplicates across overlays
✔ adding cross-referenced function names
✔ renamed 99 functions, splitting again
✔ cross-referencing 0 functions
✔ adding cross-referenced symbol names

Now:

$ tools/make-config.py --version hd cen
✔ generating psx splat config
✔ splitting config/splat.hd.stcen.yaml
✔ adjusting files at src/st/cen
✔ disassembling matched functions
✔ finding duplicates across overlays
✔ adding cross-referenced function names
✔ renamed 99 functions, splitting again
✔ splitting config/splat.us.stcen.yaml           👈 NEW!
✔ cross-referencing 98 functions                 👈 FIXED!
✔ adding cross-referenced symbol names
✔ renamed 56 data/bss symbols, splitting again   👈 56 instead of 0!