pub fn link_elf(elf_data: &[u8]) -> Result<Image, TranspileError>Expand description
Transpile an rv64em ELF into a v3 chain [Image].
Output Image:
code: CODE sub-blob (jump_table + code + packed bitmask) of the translated user code.endpoints: populated from the.subsoil.endpointsELF section (entries emitted by#[subsoil::endpoint(N)]). Each descriptor’sfn_ptrpoints at a per-endpoint trampoline that calls the user fn and halts. Guests must declare at least one endpoint; the transpiler errors if the section is absent or empty. Every endpoint getsinitial_regs[1] = stack_topbaked in.memory_mappings+pinned_slots+initial_slots: declarative address-space layout. The transpiler emits one mapping per region (stack, ro, rw, heap) backed by a slot. ro_data lives inpinned_slots(RO at runtime); rw_data and the zero-filled stack/heap regions live ininitial_slots(RW). The kernel’s chain genesis installs Cap::Data’s for each declared slot.gas_slots,quota_slots,yield_marker_slot: standard kernel-ABI defaults from [javm_cap::abi].