Fix spurious differences when using ninja diff
#2294
Merged
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.
DTK's
ninja diff
feature can be useful for finding which symbol in the dol is causing the hash to not match, but if there are any symbols in linked TUs in the dol that had their padding manually added to them, then DTK just picks those up as diffs (because the size is wrong) and doesn't show the symbol that's actually affecting the hash. I went through and fixed all these padding issues, soninja diff
now doesn't show anything, which means in the future it can be used without showing any false positive padding diffs.Some of these padding issues are because of the stripped abstract base class vtable issue that affects a lot of TUs, I replaced the hacks to add padding there with a new solution using
dummy_abstract_class
, which should be pretty similar to the real fix for this, we just don't know the actual names of these classes.