Skip to content

feat(native): resolve RISC-V ELF initializer pointers - #12109

Merged
morluto merged 1 commit into
morluto:mainfrom
ShuaixinHuang:replace-v2/pr-12068
Nov 19, 2026
Merged

morluto merged 1 commit into
morluto:mainfrom
ShuaixinHuang:replace-v2/pr-12068

Conversation

@ShuaixinHuang

@ShuaixinHuang ShuaixinHuang commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Replaces #12068 against main 2182996.

Preserve RV32/RV64 support, TLS filtering and main's extended symbol section handling. Address the earlier P2 by selecting the named native initializer contract from the binary diagnostics family.

Validation

  • 391 focused tests and scoped lint passed, including RV32/RV64 and upstream extended sections through compiled CLI and stdio MCP.
  • Full hosted checks and other platforms were not run locally.

Author readiness

Human owner: @ShuaixinHuang

  • 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T00:16:43.080640Z a02aa29 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] The reviewed changes appear safe to merge; no blocking issue was found.

Summary

Adds RV32/RV64 initializer pointer support through the shared ELF relocation reader.

  • ELF relocation reads now recognize RV32 and RV64 pointer rules.
  • RISC-V initializer reports now resolve relocated constructors and finalizers.

Review was source-only; dependencies were not installed. Whether this PR has been replaced could not be checked because GitHub authentication was unavailable.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A["ELF machine and word size"] --> B["Shared relocation rules"]
  B --> C["Dynamic relocation writes"]
  B --> D["Section relocation writes"]
  C --> E["Resolve initializer slots"]
  D --> E
  E --> F["Known target or explicit unknown"]
  F --> G["Shared CLI and MCP report"]
Loading

Reviews (2) · Last reviewed commit: "feat(native): resolve RISC-V ELF initial..." · Reviewed by Greptile

@morluto
morluto merged commit af20de3 into morluto:main Nov 19, 2026
53 checks passed
chacobsa pushed a commit to chacobsa/rea that referenced this pull request Nov 19, 2026
Resolve the relocation-kind conflict with RISC-V support (morluto#12109): JUMP_SLOT
now comes from the per-machine RELOCATION_KINDS table. RISC-V JUMP_SLOT stays
an unknown write under image-definitions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@morluto morluto added area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior enhancement New feature or request labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants