Repository navigation
Conversation
adi0x90
force-pushed
the
fix/inspect-symbols-default-view
branch
from
November 30, 2026 08:57
23a1f70 to
b172733
Compare
`fat inspect symbols --file app.elf` printed every symbol sorted by address. On an ESP32-C6 application ELF that was 4,841 lines: 2,837 zero-size labels and 1,616 absolute symbols (register offsets, peripheral bases, ROM functions) before the first real symbol, followed by a single-line alias warning naming ~130 symbols. The total also summed aliased ranges and ROM functions, overstating image bytes by 23% (215,966 vs 175,738). - Sort by size, largest first, and cap tables at 25 rows (`--limit N`, `--limit 0`); CSV, JSONL and `--json` stay complete unless limited. - Hide zero-size, absolute and undefined symbols by default and report how many were hidden; `--all` or exact `--name` selections include them. - Lead a truncated table with a bytes-by-section summary. - Count each covered address range once per section, so aliases no longer double-count; report the overlap and up to three short alias examples. - Show only the legend letters that appear, and drop the long "N sizes summed" line. - List only changed, added and removed rows in text diffs. - Document the previously undescribed flags in `--help`. The JSON schema moves to elf-symbols/v3: `total_size` is now covered bytes, and `overlap_size`, `sections`, `hidden` and `omitted_count` are new.
adi0x90
force-pushed
the
fix/inspect-symbols-default-view
branch
from
November 30, 2026 09:00
b172733 to
d7e6cc3
Compare
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.
Problem
fat inspect symbols --file jtag_lab.elf(an ESP32-C6 app ELF) printed 4,841 lines:RV_STK_*, peripheral bases such asLP_I2C, and ROM functions such as_vfprintf_r) before the first real symbol;The total was also too high: 215,966 B against 175,738 B actually in the image. It counted aliased address ranges more than once and included ROM functions that sit outside the image.
Change
--limit Nchanges the cap and--limit 0removes it. CSV, JSONL and--jsonstay complete unless--limitis given.--allbrings them back, and so does selecting exact names with--nameor--names-file.N sizes summed: …line is gone, and the per-term sum is shown only for 2–8 rows with no overlap.--difftext output lists only changed, added and removed rows;--jsonstill has every row.--help: descriptions added for the flags that had none.JSON schema moves to
elf-symbols/v3.total_sizenow means covered bytes, andoverlap_size,sections,hiddenandomitted_countare new fields. The feature is still under Unreleased, so no released schema changes.Result on
jtag_lab.elfThe table output is now 51 lines:
Verification
cargo test --workspace --no-fail-fast: 2,165 passed, 0 failed, 220 suitescargo fmt --all --checkandcargo clippy -p firmware-analysis-toolkit --all-targetsare cleanjtag_lab.elfwith these flag sets:--all--filter,--name(including a missing name)--in-ram --limit 5 --demangle--format csv,--format jsonl,--json,--json --limit 3--diffNot changed here
--in-ramand--writableinclude.flash.init_array, because the section hasSHF_WRITEset. That is how the existing code classifies regions.COLUMNSand falls back to 100, as inreport.rs. Most shells don't exportCOLUMNS, so long names are truncated unless--widthis passed.