Repository navigation
fix(elf): admit Xtensa through canonical target contracts - #11178
Conversation
Adapted from #10774 without illustrative screenshots. Co-authored-by: gensokyo-dev <[email protected]>
Keep ELF-only Xtensa out of PE, Mach-O and DOS summaries with one canonical exclusion set. Validate both advertised JSON Schema dialects and preserve the Ghidra header-selected language policy. Co-authored-by: gensokyo-dev <[email protected]>
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Medium impact] No blocking code issue remains in the reviewed changes. SummaryThe PR recognizes ELF machine 94 as
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
ELF["ELF machine 94"] --> Parser["Canonical xtensa target"]
Parser --> Summary["CLI/MCP summary and Evidence"]
Parser --> Admission{"Provider"}
Admission --> Ghidra["Ghidra: header-selected import"]
Admission --> Hopper["Hopper: declined"]
Admission --> IDA["IDA: declined"]
Exclusions["Shared header exclusions"] --> Summary
Reviews (2) · Last reviewed commit: "test(elf): preserve the full target matr..." · Reviewed by Greptile |
Co-authored-by: gensokyo-dev <[email protected]>
Validate every canonical and impossible classification through both live session outputs. Refresh the packaged catalog summary after synchronizing with main's compact schema contracts. Co-authored-by: gensokyo-dev <[email protected]>
Summary
Fixes #10765. Xtensa ELF headers (
EM_XTENSA = 94) now produce canonicalxtensatargets, pass Ghidra admission and preserve the architecture in Evidence. Ghidra's ELF loader selects the import language. Hopper and IDA continue to decline this family.Adapted from @bezabyte / Josh's #10774 with original authorship preserved. One canonical exclusion set supplies both
HeaderArchitectureand live CLI/MCP summary schemas, preventing impossible Xtensa PE, Mach-O and DOS targets. No screenshots or binaries are committed.Boundary and scope
ELF header parsing owns the family fact; target types, provider admission and Evidence consume it. Shared header-family constraints replace duplicated runtime exclusions. This is an ordinary correction within existing read-only ELF/Ghidra authority: no new provider, target execution, injection, mutation, installer or processor profile. Maintainer scope decision: not applicable. Raw-binary selection and language overrides retain their contracts. The Ghidra guide records the header-selected policy and ISA/ABI limits.
Executed evidence
esp32-bootloader.elf, SHA-256ec58a07e847ccb405d5644d6daa66707c0641770eb8bfc2f36e1bffbd8c02a33.readelfindependently confirms ELF32 little-endian Xtensa andcall_start_cpu0at0x40098118.inspect-artifactrejected machine 94; fixed CLI inspection succeeds on that same file.open_binary→procedure_pseudo_code→binary_session→close_binaryall succeed. Target SHA-256, analysis-profile digest and pseudocode agree between CLI and MCP; the input digest is unchanged. Both retain the provider's calling-convention warning.Xtensa:LE:32:defaultand decompiles the expected symbol at thereadelfaddress. Its owned project was deleted. This establishes loader/decompiler acceptance, not full bootloader semantic equivalence or support for every Xtensa extension/ABI.Checks and review corrections
npm run test:focused -- src/domain/binaryTarget.test.ts src/ghidra/GhidraProvider.behavior.test.ts src/hopper/HopperProvider.test.ts src/ida/IdaProvider.test.ts tests/boundary/mcp/liveBinaryTargetSummary.test.ts— 387 passed initially and again after synchronizing main and correcting the review findings.npm run check:fast— typecheck, lint and architecture guards passed, including after synchronizing main.npm run docs:check— generated-document checks and 8 consistency tests passed before main synchronization.npm run verify:advertised-schemas -- --update-summary— succeeded in the temporary namespace; listed 4 packaged catalogs and checked 31 patterns through V8, Go RE2 and Python. C++ RE2/Rust validators were unavailable and are explicitly unverified. Updated the tracked summary: onlyopen_binary's compact output digest changes after main's schema-profile migration.Greptile follow-up completed successfully (5/5); both actionable review threads are resolved. Codex review could not run because the repository quota is exhausted. Actions remain queued, so they are not reported as passed. Maintainer-authorized administrative merge is used for that infrastructure blocker after local validation.
Author readiness
Human owner: @N0zoM1z0 (listed author exemption in CONTRIBUTING.md).