Expand description
Linker-based RISC-V ELF to PVM transpilation.
Unlike the basic transpile_elf, this module processes ELF relocations
to correctly handle data references in code. This is required for
real-world programs (like k256 crypto) that reference .rodata constants.
Approach:
- Parse ELF sections and relocations
- Compute PVM memory layout (stack, ro_data, rw_data addresses)
- Build a relocation map: code_offset → resolved_address
- Translate RISC-V instructions, using relocation info to replace AUIPC+LO12 pairs with direct load_imm of the final PVM address
- Emit a v3
javm_cap::image::Imagewith the code sub-blob, declared endpoints, and standard kernel-ABI slot conventions.
Functions§
- link_
elf - Transpile an rv64em ELF into a v3 chain [
Image].