Decompollaborate / spimdisasm

MIPS disassembler
https://pypi.org/project/spimdisasm/
MIT License
45 stars 13 forks source link

[Frug]: Missing unreferenced RODATA symbols in function using migrate_rodata_to_functions: True #172

Closed Ryan-Myers closed 2 months ago

Ryan-Myers commented 2 months ago

Explain the problem.

So Diddy Kong Racing has a function where there's a few RODATA symbols that are supposed to be part of a specific function, but got optimized out by the compiler. So the symbols are still there, and they're required to match, but the function itself doesn't reference these symbols. This makes spim ignore them when using migrate_rodata_to_functions: True.

If I manually add the missing RODATA symbols into the file, I get a matching build. So it's the only thing preventing me from having a matching build for DKR.

I've tried several things to get it to generate the symbols including defining them with force_migration:True in the symbol file, with no luck.

Here's what is generated: image

And here's what is should look like to match: image

Here's me trying to force the symbols: image

and here's the error message given from splat: image

Reproducer

https://github.com/Ryan-Myers/Racing_Splat

spimdisasm version

1.28.1

Optional: splat version

0.27.0

Optional: Version of other stuff

No response

AngheloAlf commented 2 months ago

Fixed on release 1.30.0. Commit 9593eb7ab875d5c44989f810dbb0e08c5560bd41