Repository navigation
feat(native): resolve RISC-V ELF initializer pointers - #11828
ShuaixinHuang wants to merge 1 commit into
Conversation
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] The PR appears safe to merge based on the changed code. SummaryAdds RV32/RV64 support to read-only ELF initializer inspection through shared, class-aware relocation rules.
Review used code inspection; tests were not rerun. Reviews (3) · Last reviewed commit: "feat(native): resolve RISC-V ELF initial..." · Reviewed by Greptile |
Summary
Simple Clang/LLD-produced RV32/RV64 ELF shared libraries return incomplete initializer reports with all four addresses unknown on main. Resolve their RELATIVE/RELR local constructors and finalizers, and word-sized absolute references to defined functions; keep external constructors unresolved imports.
The shared relocation owner now selects rules by machine and ELF class, with RV32/RV64 profiles, explicit GLOB_DAT ownership, and known COPY/TLS/resolver write extents. RISC-V type 6 is TLS_DTPMOD32 and must never inherit x86 GLOB_DAT value semantics. Migrate section consumers to the same class-aware rules. Preserve malformed/unknown, partial-write, duplicate-write, capacity and cancellation behavior.
This is a read-only compatibility extension to existing ELF inspection. No matching open initializer PR was found; existing RISC-V provider-admission work covers a different boundary.
Validation
npm run check:fast: typecheck/lint and architecture guards passed.npm run docs:check: 6 generated-document tasks and 8 consistency tests passed. Updated the existing guide/spec/plan/tasks.npm run verify:test-discovery: all 3,773 test/spec files discovered exactly once.The old unsupported-machine controls in initializer and IL2CPP tests now use still-unsupported PPC64; their refusal assertions remain in place. Portable tests use synthetic ELF carriers, while compiler-produced binaries remain outside the repository.
Coverage limit: verification ran on Linux x86-64 with little-endian cross-produced files. No RISC-V host, dynamic-loader execution, production application dump, or target execution was tested. TLS/COPY/resolver controls are source tests, not claims about the six producer images.
Author readiness
Human owner: @ShuaixinHuang