Function kernel_loader::read_elf
source · pub(crate) fn read_elf<F>(
file: &mut F,
required_ei_class: Option<u32>
) -> Result<Elf64>where
F: FileReadWriteAtVolatile,
Expand description
Reads the headers of an ELF32 or ELF64 object file. Returns ELF file and program headers,
converted to ELF64 format. If required_ei_class
is Some and the file’s ELF ei_class doesn’t
match, an Err is returned.