Skip to content

Conversation

@LagoLunatic
Copy link
Collaborator

@LagoLunatic LagoLunatic commented Nov 26, 2025

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?

Copy link
Owner

@encounter encounter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@encounter encounter merged commit d0b8b44 into encounter:main Nov 27, 2025
24 checks passed
@LagoLunatic LagoLunatic deleted the hidden-data branch December 1, 2025 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants