MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / assembled_to_elf_file

Function assembled_to_elf_file

src/compilation_pipeline.rs:1741–1743  ·  view source on GitHub ↗

Build a static ELF64 executable from an assembled hosted program. Linked at [`USER_CODE_BASE`] so its `e_entry`/`p_vaddr` land in the kernel's user code region. The entry point resolves from `_start`; the single `PT_LOAD` segment carries the flat image (zero-filled BSS included). Suitable for storing as a regular file via [`build_fs_image`] and loading through the kernel's `sys_exec`.

(assembled: &AssembledOutput)

Source from the content-addressed store, hash-verified

1739 i64::from_str_radix(hex, 16).expect("hex fs.hll const")
1740 } else {
1741 val.parse().expect("decimal fs.hll const")
1742 };
1743 }
1744 panic!("const {name} not found in fs.hll");
1745 }
1746

Calls 1

to_elfMethod · 0.80