Repository navigation
Rewrite symbol management system - #543
Conversation
ethteck
left a comment
There was a problem hiding this comment.
All of my things are just language changes. I'm happy to see splat have a better system for symbol resolution and management . thanks for all your work as always :)
Happy to go in and make all these language changes myself if you don't mind.
| * It is pretty likely for many symbols that have autogenerated names to change their naming a bit. | ||
| * In the past splat failed to properly set some attributes required for autogenerated symbol naming, so splat symbolized them "wrong". For example it only used the vram address (like `D_{VRAM}`) when it should have been using both the vram and rom addresses (`D_{VRAM}_{ROM}`) for naming overlay symbols. | ||
| * Now those attributes are correctly set, meaning those symbols are correctly named now. | ||
| * This is breaking if you were referencing those wrongly named symbols in C code, because you'll get linker errors for not finding the old named symbols. |
There was a problem hiding this comment.
I feel like all these bullets should be moved to a caution section of the changelog and shouldn't be separate - they're all about the same idea. It can just be a new caution paragraph or something
| * Now those attributes are correctly set, meaning those symbols are correctly named now. | ||
| * This is breaking if you were referencing those wrongly named symbols in C code, because you'll get linker errors for not finding the old named symbols. | ||
| * Versions between 0.41.0 and 0.50.0 have been skipped as a way to note this can be a pretty big breaking change. | ||
| * Rewrite symbol management system. |
There was a problem hiding this comment.
We're switching verb tenses here - "stuff has been done" vs "do stuff". Personally, for splat, I'd prefer the past tense for the changelog. I can do an edit pass on this if you don't mind.
There was a problem hiding this comment.
I would appreciate a lot if you did that! Feel free to go ahead, I kinda suck writing up stuff 😅
Co-authored-by: Ethan Roseman <ethteck@gmail.com>
|
btw, I'm not a great fan about the name |
SegmentManager? |
|
dun |
Completely rewrite how splat internally tracks symbols.
This rewrite was made to try to fix all the nasty issues regarding overlapping overlays, like using a symbol from a different overlay producing duplicated names, not using the corresponding name format, splat sometimes ignoring some user-declared symbols, etc.
This PR should unblock people from working with overlays.
This PR also makes splat a lot more strict about user-declared symbols.
splat now will reject symbols that are ambiguously declared, for example.
segment:androm:attributes missing. You need to tell splat to which segment they are associated.segment:androm:are assumed to be part of any of the global segments. If no global segment cover this symbol then it will be rejected.If you were declaring a symbol as part of a segment it didn't belong to as a visibility hack, then you should move to the new "prioritised_segment" system. It allows to tell which segments a given segment can see, allowing to control the symbol visibility per segment.
For symbols that are not part of any segment, you should declare them with
absolute:True.An example of symbols like this are the libultra pif symbols (
osTvType, etc).Some arbitrary fixes: