[PR #4819] [MERGED] fix(domain): admit Qualcomm Hexagon (EM_HEXAGON, 164) ELF binaries #6423

Closed
opened 2026-10-31 01:14:21 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4819
Author: @prasad2512
Created: 10/17/2026
Status: ✅ Merged
Merged: 10/17/2026
Merged by: @morluto

Base: main ← Head: fix/hexagon-elf-admission


📝 Commits (2)

  • 46920b8 fix(domain): admit Qualcomm Hexagon (EM_HEXAGON, 164) ELF binaries
  • ecfdf36 fix(hopper,ghidra): add Ghidra guidance to Hopper Hexagon refusal and add Ghidra admission regression test

📊 Changes

12 files changed (+123 additions, -23 deletions)

View changed files

📝 src/domain/binaryTarget.test.ts (+1 -0)
📝 src/domain/binaryTarget.ts (+11 -0)
📝 src/domain/binaryTargetTypes.ts (+15 -9)
📝 src/domain/elfFixedHeader.ts (+2 -0)
📝 src/domain/peMachine.ts (+1 -1)
📝 src/ghidra/GhidraProvider.behavior.test.ts (+32 -0)
📝 src/ghidra/GhidraProvider.ts (+1 -0)
📝 src/hopper/HopperAnalysisProfile.ts (+9 -3)
📝 src/hopper/HopperProvider.test.ts (+21 -0)
📝 src/hopper/HopperProvider.ts (+6 -8)
📝 src/ida/IdaProvider.test.ts (+19 -0)
📝 src/ida/IdaProvider.ts (+5 -2)

📄 Description

Summary

Resolves #4781 by admitting Qualcomm Hexagon DSP ELF objects (e_machine = 164, EM_HEXAGON).

Problem and expected behavior

open_binary previously refused valid Qualcomm Hexagon DSP ELF objects with Cannot open artifact: unsupported ELF architecture because REA's admission layer lacked EM_HEXAGON (164). Ghidra 12.1+ already supports Hexagon (Hexagon:LE:32:default).

Change and scope

  • Added hexagon to BINARY_ARCHITECTURES in src/domain/binaryTargetTypes.ts.
  • Excluded hexagon from thin HeaderArchitecture and defined dedicated hexagon ELF target in BinaryTarget and ExecutableMetadata.
  • Mapped case 164: return "hexagon"; in src/domain/elfFixedHeader.ts.
  • Included hexagon in Ghidra's SUPPORTED_ARCHITECTURES.
  • Gracefully declined hexagon in Hopper and IDA with Ghidra-directed diagnostics.
  • Added unit tests for Hexagon ELF parsing and provider admission checks.

Contract and boundary impact

  • Semantic owner: src/domain/elfFixedHeader.ts & src/domain/binaryTargetTypes.ts
  • Contribution scope fit: Ordinary bug fix within existing domain/provider boundaries; not applicable for maintainer scope decision.
  • Platform compatibility: All supported REA platforms.

Expected effects

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.

Evidence and regression coverage

  • Tests added:
    • src/domain/binaryTarget.test.ts (added Hexagon ELF fixture test)
    • src/hopper/HopperProvider.test.ts (added Hexagon decline test)
    • src/ida/IdaProvider.test.ts (added Hexagon decline test)
  • Validation performed:
    • npm run test:local -- src/domain/binaryTarget.test.ts src/hopper/HopperProvider.test.ts src/ida/IdaProvider.test.ts — 42 passed
    • turbo run typecheck lint — clean pass

Author readiness

  • Human owner: @prasad2512
  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked (#4781).
  • Tests cover changed observable behavior.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

Fixes #4781


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/4819 **Author:** [@prasad2512](https://github.com/prasad2512) **Created:** 10/17/2026 **Status:** ✅ Merged **Merged:** 10/17/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/hexagon-elf-admission` --- ### 📝 Commits (2) - [`46920b8`](https://github.com/morluto/rea/commit/46920b8de9909eea06edc2666abc6621bdaa2698) fix(domain): admit Qualcomm Hexagon (EM_HEXAGON, 164) ELF binaries - [`ecfdf36`](https://github.com/morluto/rea/commit/ecfdf36d950e083a5956d0eca134ea45d05d8c77) fix(hopper,ghidra): add Ghidra guidance to Hopper Hexagon refusal and add Ghidra admission regression test ### 📊 Changes **12 files changed** (+123 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/binaryTarget.test.ts` (+1 -0) 📝 `src/domain/binaryTarget.ts` (+11 -0) 📝 `src/domain/binaryTargetTypes.ts` (+15 -9) 📝 `src/domain/elfFixedHeader.ts` (+2 -0) 📝 `src/domain/peMachine.ts` (+1 -1) 📝 `src/ghidra/GhidraProvider.behavior.test.ts` (+32 -0) 📝 `src/ghidra/GhidraProvider.ts` (+1 -0) 📝 `src/hopper/HopperAnalysisProfile.ts` (+9 -3) 📝 `src/hopper/HopperProvider.test.ts` (+21 -0) 📝 `src/hopper/HopperProvider.ts` (+6 -8) 📝 `src/ida/IdaProvider.test.ts` (+19 -0) 📝 `src/ida/IdaProvider.ts` (+5 -2) </details> ### 📄 Description ### Summary Resolves #4781 by admitting Qualcomm Hexagon DSP ELF objects (`e_machine = 164`, `EM_HEXAGON`). ### Problem and expected behavior `open_binary` previously refused valid Qualcomm Hexagon DSP ELF objects with `Cannot open artifact: unsupported ELF architecture` because REA's admission layer lacked `EM_HEXAGON (164)`. Ghidra 12.1+ already supports Hexagon (`Hexagon:LE:32:default`). ### Change and scope - Added `hexagon` to `BINARY_ARCHITECTURES` in `src/domain/binaryTargetTypes.ts`. - Excluded `hexagon` from thin `HeaderArchitecture` and defined dedicated `hexagon` ELF target in `BinaryTarget` and `ExecutableMetadata`. - Mapped `case 164: return "hexagon";` in `src/domain/elfFixedHeader.ts`. - Included `hexagon` in Ghidra's `SUPPORTED_ARCHITECTURES`. - Gracefully declined `hexagon` in Hopper and IDA with Ghidra-directed diagnostics. - Added unit tests for Hexagon ELF parsing and provider admission checks. ### Contract and boundary impact - Semantic owner: `src/domain/elfFixedHeader.ts` & `src/domain/binaryTargetTypes.ts` - Contribution scope fit: Ordinary bug fix within existing domain/provider boundaries; not applicable for maintainer scope decision. - Platform compatibility: All supported REA platforms. ### Expected effects - [x] Read existing files or captured data. - [ ] Launch or attach to a process. - [ ] Inject instrumentation or run scripts/code. - [ ] Change process memory, registers, files, or configuration. - [ ] Contact network services. - [ ] Recover protected code or work around protections. - [ ] Documentation or usability only; no target interaction. ### Evidence and regression coverage - Tests added: - `src/domain/binaryTarget.test.ts` (added Hexagon ELF fixture test) - `src/hopper/HopperProvider.test.ts` (added Hexagon decline test) - `src/ida/IdaProvider.test.ts` (added Hexagon decline test) - Validation performed: - `npm run test:local -- src/domain/binaryTarget.test.ts src/hopper/HopperProvider.test.ts src/ida/IdaProvider.test.ts` — 42 passed - `turbo run typecheck lint` — clean pass ### Author readiness - Human owner: @prasad2512 - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. ### Before merge - [x] This PR addresses a concrete problem or an agreed enhancement. - [x] The PR has one focused outcome and the title follows type(scope): outcome. - [x] Related issue is linked (#4781). - [x] Tests cover changed observable behavior. - [x] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. Fixes #4781 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:14:21 +00:00
bsakaguchi changed title from [PR #4819] [MERGED] fix(domain): admit Qualcomm Hexagon (EM_HEXAGON, 164) ELF binaries to [PR #4819] fix(domain): admit Qualcomm Hexagon (EM_HEXAGON, 164) ELF binaries 2026-11-03 13:33:21 +00:00
bsakaguchi changed title from [PR #4819] fix(domain): admit Qualcomm Hexagon (EM_HEXAGON, 164) ELF binaries to [PR #4819] [MERGED] fix(domain): admit Qualcomm Hexagon (EM_HEXAGON, 164) ELF binaries 2026-11-03 14:35:07 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#6423
No description provided.