Skip to content

Fix diffing of relocations to symbols that have compiler-generated names#381

Open
LagoLunatic wants to merge 4 commits into
encounter:mainfrom
LagoLunatic:reloc-diffs
Open

Fix diffing of relocations to symbols that have compiler-generated names#381
LagoLunatic wants to merge 4 commits into
encounter:mainfrom
LagoLunatic:reloc-diffs

Conversation

@LagoLunatic

Copy link
Copy Markdown
Collaborator

Fixes two bugs when diffing relocations, which were treated inconsistently by different parts of objdiff:

  • When diffing functions, partially compiler-generated names (e.g. symbol$1234 and symbol$2345) are now normalized for relocation diffing. (This was already done when diffing data and when pairing up symbols.)
  • When diffing both functions and data, fully compiler-generated names (e.g. @1234 and @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 @1234 vs @2345 diffs. And if you use "Data value" mode they don't show up at all.

Before:
image
After:
image

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

Before:
image
After:
image

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.
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.

1 participant