Skip to content

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

Closed
ShuaixinHuang wants to merge 2 commits into
morluto:mainfrom
ShuaixinHuang:fix/riscv-elf-initializers-20261119
Closed

ShuaixinHuang wants to merge 2 commits into
morluto:mainfrom
ShuaixinHuang:fix/riscv-elf-initializers-20261119

Conversation

@ShuaixinHuang

@ShuaixinHuang ShuaixinHuang commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Replaces #11828 on main b21db3f329. The shared ELF relocation reader uses class-aware RV32 and RV64 rules so the initializer inspector can resolve local and defined constructor/finalizer pointers. External imports remain unresolved. Defined TLS offsets are excluded from absolute initializer relocations and exact-address names, while genuine relative addresses remain available.

Validation

  • The focused build and all 345 tests passed across the ELF relocation reader, initializer parsers, IL2CPP boundary, and compiled CLI/stdio MCP acceptance.

  • The old hosted shard failed. Its archived log download returned HTTP 403, so the exact old failure remains unverified. This head requests fresh hosted checks.

  • Compiler-produced controls from the earlier PR were not regenerated in this run. No RISC-V target was executed.

  • Both new RV32 and RV64 TLS tests failed before the review fix and passed afterward. Changed files also passed scoped lint and formatting.

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 18, 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-18T13:16:19.882284Z d18f20d New commits
ℹ️ 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 18, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] The reviewed changes appear safe to merge.

Summary

Adds RV32/RV64 initializer pointer support while keeping imports, TLS offsets, and resolver results unresolved.

  • RISC-V initializer pointers now resolve on RV32 and RV64.

The previous TLS finding is fixed. No new correctness or security issues were found in this follow-up. No superseding change appeared in the available repository history. Tests were not rerun.

Reviews (2) · Last reviewed commit: "fix(native): keep ELF TLS offsets out of..." · Reviewed by Greptile

@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