Fix diffing of relocations to symbols that have compiler-generated names#381
Open
LagoLunatic wants to merge 4 commits into
Open
Fix diffing of relocations to symbols that have compiler-generated names#381LagoLunatic wants to merge 4 commits into
LagoLunatic wants to merge 4 commits into
Conversation
This fixes a bug where "Name or address" comparison wouldn't detect relocations to symbols like name$1234 and name$2345 as being the same if they were at different addresses.
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.
Fixes two bugs when diffing relocations, which were treated inconsistently by different parts of objdiff:
symbol$1234andsymbol$2345) are now normalized for relocation diffing. (This was already done when diffing data and when pairing up symbols.)@1234and@2345) are now ignored for relocation diffing. (This was already done when pairing up symbols.)In practice this means that "Name or address" mode can now be used more reliably even in TUs with stripped data that causes the addresses to not match up (which is common in projects that use precompiled headers like TWW/TP). Prior to these fixes real name diffs were hard to spot because they could get mixed up in dozens of fake
@1234vs@2345diffs. And if you use "Data value" mode they don't show up at all.Before:


After:
It also fixes RTTI data sometimes showing as nonmatching because it contains relocations to compiler-generated symbols.
Before:


After: