Add --emit-symbol-resolution-report option for a standalone JSON report - #1630
Open
Parth (parth-07) wants to merge 1 commit into
Open
Add --emit-symbol-resolution-report option for a standalone JSON report#1630Parth (parth-07) wants to merge 1 commit into
Parth (parth-07) wants to merge 1 commit into
Conversation
Parth (parth-07)
force-pushed
the
SymbolResolutionReport
branch
from
August 10, 2026 13:48
f380cd9 to
4c85b33
Compare
This commit moves the symbol resolution report out of the text map file
into a dedicated `--emit-symbol-resolution-report=<file>` option that emits
the report as standalone JSON, and it removes the old
`--MapDetail show-symbol-resolution` sub-option that previously embedded the
report inside a `-MapStyle txt` map file.
The emitted JSON is versioned and lists, for every symbol, the selected
definition and each candidate with its input file, section, size, binding,
type, visibility, and bitcode origin, including the corresponding post-LTO
object symbol where applicable. Binding and visibility are always present so
that consumers see a complete picture instead of the abbreviated form the
text report used to print.
```
{
"SymbolResolutionReportVersion": 1,
"Symbols": [
{
"Name": "foo",
"Selected": "libc.a(malloc.o)(foo)", // <InputFile>(<SymbolName>)
"Candidates": [
{
"Name": "foo",
"InputFile": "libc.a(malloc.o)",
"Section": ".text", // omitted when no section
"Plugin": "MyPlugin", // only for plugin-created symbols
"Size": 4,
"Bitcode": false,
"SectionIndexKind": "Def",
"Binding": "Global", // always present
"Type": "Object",
"Visibility": "Default", // always present
"IsSelected": true,
"LTOObjectSymbol": { ...same shape... } // bitcode post-LTO sym
}
]
}
]
}
```
A standalone Python inspector tool is added under
`tools/SymbolResolutionInspector` to query the report by symbol name or by a
per-candidate description, and to re-emit a filtered report as
JSON.
Existing symbol resolution tests are migrated to the new option and
drive their checks through this inspector.
Signed-off-by: Parth Arora <partaror@qti.qualcomm.com>
Parth (parth-07)
force-pushed
the
SymbolResolutionReport
branch
from
August 10, 2026 15:29
4c85b33 to
b81db09
Compare
Parth (parth-07)
marked this pull request as ready for review
August 10, 2026 15:31
Parth (parth-07)
requested review from
quic-areg and
Shankar Easwaran (quic-seaswara)
as code owners
August 10, 2026 15:31
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.
Add --emit-symbol-resolution-report option for a standalone JSON report
This commit moves the symbol resolution report out of the text map file
into a dedicated
--emit-symbol-resolution-report=<file>option that emitsthe report as standalone JSON, and it removes the old
--MapDetail show-symbol-resolutionsub-option that previously embedded thereport inside a
-MapStyle txtmap file.The emitted JSON is versioned and lists, for every symbol, the selected
definition and each candidate with its input file, section, size, binding,
type, visibility, and bitcode origin, including the corresponding post-LTO
object symbol where applicable. Binding and visibility are always present so
that consumers see a complete picture instead of the abbreviated form the
text report used to print.
A standalone Python inspector tool is added under
tools/SymbolResolutionInspectorto query the report by symbol name or by aper-candidate description, and to re-emit a filtered report as
JSON.
Existing symbol resolution tests are migrated to the new option and
drive their checks through this inspector.