Repository navigation
Conversation
Port the name-recovery half of Ghidra's GolangSymbolAnalyzer. A new
AnalysisPass (s1_pclntab::GoPclntabPass, id `gopclntab`, default-ON,
Go-gated) that, when the binary is Go, locates and parses the embedded
pclntab and emits a SymFact{Function} per Go function — so main.main /
main.compute / runtime.* render NAMED instead of sub_<addr>. The pclntab
survives stripping, so this works even on a `-ldflags=-s -w` binary that
has no .symtab.
- Locate: .gopclntab/gopclntab section -> runtime.pclntab symbol ->
validated byte scan of .rodata/.data.rel.ro/.noptrdata/.data
(GoPcHeader.getPcHeaderAddress + findPcHeaderAddress). Endianness via the
LE-then-BE magic probe.
- Parse all four magics: go1.2 0xfffffffb (legacy direct-functab), go1.16
0xfffffffa (absolute entry), go1.18 0xfffffff0 / go1.20 0xfffffff1
(32-bit PC-relative entryoff from textStart). Byte layouts from Ghidra's
GoPcHeader/GoModuledata/GoFunctabEntry/GoFuncData, cross-checked against
the Go runtime source at go1.18. Inline sentinels + go:buildid names
skipped. Defensive: any malformation => empty output, never panic.
- Gate: registered in passes_for only for Compiler::Go (the same
.go.buildinfo gate the Go no-return list uses, Increment 15), so non-Go
binaries are structurally unaffected. Reuses the EXISTING symbol commit
arm (idempotent: a real .symtab name still wins). Settable
`--option gopclntab on|off` (stages.toml + KUNA_OPTION_NAMES +
architecture flag + engine analysis_pass_enabled + kuna_live_value),
default-on. settable_count 36 -> 37; catalog fixture + docs/assertions.md
regenerated; count fixtures updated.
Tests (both ran, not skipped): 12 hermetic parser units (no `go` — the
merge gate: go1.18/1.16/1.2 decode, LE+BE, malformation/defensiveness) +
a real-Go e2e (verify_go_pclntab.rs) that `go build -ldflags=-s -w`s a
compute()-calls-main() program at runtime (hermetic, skips if no `go`) and
asserts main.main/main.compute/runtime.main are recovered as NAMED on the
STRIPPED binary, and that `--option gopclntab off` suppresses it.
Gates: make test 675/675 PARITY OK; make test-stages 159/159 PARITY OK;
make rust-test green; kuna catalog --check OK. golang-symbols reclassified
⛔->✅ in docs/analysis-port-log.md (Increment 34). No divergence to the
parity oracles (Go-gated, real-ELF-path-only).
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FvRnfTgYKoZvS2TEvdYpWb
Contributor
Author
|
APPROVE |
Contributor
Author
|
Closing as superseded by #31 ("Analysis-tier: Go pclntab function-name recovery"), which was merged into |
mahaloz
added a commit
that referenced
this pull request
Oct 2, 2026
…ad, before a call Adds e_bcall (call on a branch), e_lcall (after a loop of loads) and e_arg (the call takes the global's old value) to storealias_x86_64.c, rebuilds the three fixtures (SHAs in the README), round-trips them in store_alias.rs and adds stage assertions #33-#38. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_012UUBmGqZTcD5N8LxpVsiQt
mahaloz
added a commit
that referenced
this pull request
Oct 2, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_012UUBmGqZTcD5N8LxpVsiQt
mahaloz
added a commit
that referenced
this pull request
Oct 2, 2026
…ad, before a call Adds e_bcall (call on a branch), e_lcall (after a loop of loads) and e_arg (the call takes the global's old value) to storealias_x86_64.c, rebuilds the three fixtures (SHAs in the README), round-trips them in store_alias.rs and adds stage assertions #33-#38. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_012UUBmGqZTcD5N8LxpVsiQt
mahaloz
added a commit
to borancar/kuna
that referenced
this pull request
Nov 14, 2026
Renumber the PR's calleeargs assertions Noelo-Lab#31-Noelo-Lab#33 to Noelo-Lab#33-Noelo-Lab#35 after main's paint3 Noelo-Lab#31/Noelo-Lab#32; synthesize baseline-stages.json. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0179iMKQeLQDThvbHGNoGw8h
mahaloz
added a commit
to borancar/kuna
that referenced
this pull request
Nov 14, 2026
…ocal head The fork's merge of origin/main (034a042) carries no code beyond the PR commit and the same Noelo-Lab#33-Noelo-Lab#35 renumbering already on this head; every conflict resolves to this head's content. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0179iMKQeLQDThvbHGNoGw8h
mahaloz
added a commit
to borancar/kuna
that referenced
this pull request
Nov 14, 2026
…oelo-Lab#1581 docs/baseline-stages.json is synthesized with mergebaseline.py (main's keys plus the five CALLEEARGS Noelo-Lab#33-Noelo-Lab#37 this branch adds); every other file merged without conflict. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0179iMKQeLQDThvbHGNoGw8h
mahaloz
added a commit
that referenced
this pull request
Nov 24, 2026
…ized body [AUTOMATED] An unplaced store forgets only the regions of its address's coefficient-1 variable bases (havoc_store), or only mutable image memory when it has none. A store whose address depends on the entry stack pointer or on another variable whose region the state holds, without that variable being a forgotten base, therefore left that memory as it was: the exploration kept reading the value from before the store and the emitter folded it into the program. Such a store is now marked lost (Emulator::reaches_kept, AccessRecord::lost); the emitter records the overlay address of each live instruction whose lost store it kept (EmitStats::lost_stores), and warn_lost_stores, run with the other post-decompile checks, counts those a basic block of the final function covers: "pushan: incomplete: N stores through an address the emulation could not place on a path of the body". No option. The block decides, not the store op: when the stale read is folded to a constant the decompiler removes the store as dead and the body is false with no trace of it. Fixture f_cell before the merge fix prints `return 1;` (the program returns 2); a count of surviving store ops stays silent there, the block count reports 1. Code the decompiler removed counts nothing. Unplaced loads are not counted: their unknown is never folded, so the overlay keeps the program's own load. 48 rows (default, with the merge fix): the warning appears on curl (22), huffman (30), cairuh (1), blaster (7) and smt_no_solve (4) themida, all already warned, and on blaster_dolphin_themida (1: a store over the frame pointer and a merged 0/1 context flag); on none of the 24 rows classed SAME and none of the Tigress 30 subset; C unchanged on all 48. Without the merge fix it fires on zlib_themida (6). Fixture f_lost (stage #33): a store at &v ^ (a0 & 8); #19 counts it. Stage baseline 5049. Spec 02 2.11 (havoc paragraph, header warnings, fixture list). Co-Authored-By: Claude Fable 5.2 <[email protected]>
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.
Port the name-recovery half of Ghidra's GolangSymbolAnalyzer. A new AnalysisPass (s1_pclntab::GoPclntabPass, id
gopclntab, default-ON, Go-gated) that, when the binary is Go, locates and parses the embedded pclntab and emits a SymFact{Function} per Go function — so main.main / main.compute / runtime.* render NAMED instead of sub_. The pclntab survives stripping, so this works even on a-ldflags=-s -wbinary that has no .symtab.validated byte scan of .rodata/.data.rel.ro/.noptrdata/.data
(GoPcHeader.getPcHeaderAddress + findPcHeaderAddress). Endianness via the
LE-then-BE magic probe.
--option gopclntab on|off(stages.toml + KUNA_OPTION_NAMES + architecture flag + engine analysis_pass_enabled + kuna_live_value), default-on. settable_count 36 -> 37; catalog fixture + docs/assertions.md regenerated; count fixtures updated.Tests (both ran, not skipped): 12 hermetic parser units (no
go— the merge gate: go1.18/1.16/1.2 decode, LE+BE, malformation/defensiveness) + a real-Go e2e (verify_go_pclntab.rs) thatgo build -ldflags=-s -ws a compute()-calls-main() program at runtime (hermetic, skips if nogo) and asserts main.main/main.compute/runtime.main are recovered as NAMED on the STRIPPED binary, and that--option gopclntab offsuppresses it.Gates: make test 675/675 PARITY OK; make test-stages 159/159 PARITY OK; make rust-test green; kuna catalog --check OK. golang-symbols reclassified ⛔->✅ in docs/analysis-port-log.md (Increment 34). No divergence to the parity oracles (Go-gated, real-ELF-path-only).
Claude-Session: https://claude.ai/code/session_01FvRnfTgYKoZvS2TEvdYpWb