pub fn load_elf<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 32-bit or 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).