Function kernel_loader::read_elf_by_type
source · pub(crate) fn read_elf_by_type<F, FileHeader, ProgramHeader>(
file: &mut F
) -> Result<Elf64>
Expand description
Reads the headers of an ELF32 or ELF64 object file. Returns ELF file and program headers,
converted to ELF64 format. FileHeader
and ProgramHeader
are the ELF32 or ELF64 ehdr/phdr
types to read from the file. Caller should check that file
is a valid ELF file before calling
this function.