Function kernel_loader::read_elf

source ·
pub(crate) fn read_elf<F>(file: &mut F) -> Result<(Elf64, ElfClass)>
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 as a single internal representation that can handle either 32- or 64-bit images, and the ELF class of the original image.