Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
PPCSymbolDB: Handle data symbols in SymbolMap properly #6101
There are some issues regarding data symbols and symbol maps.
The first one is that data symbols from games' symbol map aren't loaded. However, if they get loaded somehow, they'll get saved as function symbol if Dolphin saves them and load them later on which is the second issue. This issue is almost invisible when dealing with ELF files since the symbols are loaded from the ELF file itself unless you save the symbol map, clear them and reload the symbol map. I won't be surprised that symbols loaded from RSO files are impacted.
This PR loads symbols from all sections in a given map file. I compared the result with the one I get with the ELF games I have and ctors/dtors symbols are present in my ELF files. I also removed the skip when symbol names begin with ".init" and ".text" (ex: ".text JSystemV.a J3DUDL.cpp") because these symbols aren't meaningless and can be seen in the Memory View. Other symbols beginning with .sbss, .bss, .data, etc. aren't skipped, so it doesn't make much sense anyway.
Then, I fixed the data symbols save by adding a data section in the Dolphin generated map.
I tested symbol maps from the following games and they still load properly:
Regardless, I'm open to suggestions if you have any.
Ready to be reviewed & merged.