Ignore hidden symbols when diffing data sections#291
Merged
encounter merged 1 commit intoencounter:mainfrom Nov 27, 2025
Merged
Ignore hidden symbols when diffing data sections#291encounter merged 1 commit intoencounter:mainfrom
encounter merged 1 commit intoencounter:mainfrom
Conversation
e15681d to
87066de
Compare
encounter
approved these changes
Nov 27, 2025
Owner
encounter
left a comment
There was a problem hiding this comment.
Good catch, thanks! I think this a little too lenient, but probably fine. SymbolFlag::Ignored is supposed to be the thing that controls this behavior, but I can't think of any cases where we'd have a symbol marked Hidden that we would actually would care to diff. Can revisit if it breaks anything.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I noticed that dtk's auto-generated "gap" symbols are hidden in objdiff, but still count against the data section's match percent.
This can be an issue for games like TP which don't have alignment info in their symbol maps, as dtk will add a ton of gap symbols on the left to compensate for the unknown alignment, and then the right side will have the correct alignment so they don't need gap symbols. By ignoring hidden symbols like this, it more accurately looks at the matched data, causing TP's matched data % to increase from its current value of 46.05% (obviously wrong since it's lower than 59.24% linked data) up to 97.02% matched, which I think I probably accurate.
For games with known alignment like TWW, this change seems to have no effect at all. Data diffs are accurate both before and after.
I'm not sure if ignoring gaps was intentional or not. Are there other games where ignoring them results in less accurate diffs?