Closed dezgeg closed 4 months ago
It's funny that you raise this PR - I am having the same issue with ESA (but I'm still using bss/sbss - I need to tell splat to use .common and then this PR will likely solve my issues too!)
Yeah, I had this kind of thing as a hack locally since quite a while about it and forgot about it until I was reminded by the commit adding --use-comm-section
...
This can be convenient with games using
-G
with older aspsx where static vs. non-static symbols cause different code generation.Without this, if you run into a function which refers to a symbol that must be marked static to get the code generation correct, the only option is to migrate .sdata/.sbss for the C file containing it.
With the --use-comm-for-lcomm option that isn't necessary and the usual way of putting the address of the variable to symbols.txt still works.