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

Method to_elf

crates/asm-to-binary/src/assembler/output.rs:215–217  ·  view source on GitHub ↗

Produce a minimal ELF-64 executable for RV64IMAFD (little-endian). Layout: ELF header 1 program header section data section headers strtab symtab A single combined `PT_LOAD` segment covers all sections. This avoids the QEMU page-permission conflict that arises when .text (R X) and .bss (R W) share the same 4 KB page: with one `PT_LOAD` there is no conflicting mapping. Since all code uses P

(&self, load_base: u64)

Source from the content-addressed store, hash-verified

213 .filter(|e| e.file_id == file_id && e.line == line)
214 .map(|e| e.addr)
215 .min()
216 }
217
218 /// Lowest code address on the first line at or after `line` in `file`, so
219 /// label, blank, and comment lines resolve to the code that follows them.
220 pub fn addr_for_source_at_or_after(&self, file: &str, line: u32) -> Option<u64> {

Callers 15

assembled_to_elf_fileFunction · 0.80
uiMethod · 0.80
link_stdlib_and_runFunction · 0.80
compile_sampleFunction · 0.80
compile_to_elfFunction · 0.80
elf_starts_with_magicFunction · 0.80
elf_class_is_64bitFunction · 0.80
elf_machine_is_riscvFunction · 0.80

Calls 1