Function kernel_loader::load_elf64
source · pub fn load_elf64<F>(
guest_mem: &GuestMemory,
kernel_start: GuestAddress,
kernel_image: &mut F,
phys_offset: u64
) -> Result<LoadedKernel>where
F: FileReadWriteAtVolatile,
Expand description
Loads a kernel from a 64-bit ELF image into memory.
The ELF file will be loaded at the physical address specified by the p_paddr
fields of its
program headers.
§Arguments
guest_mem
- The guest memory region the kernel is written to.kernel_start
- The minimum guest address to allow when loading program headers.kernel_image
- Input vmlinux image.phys_offset
- An offset in bytes to add to each physical address (p_paddr
).