pub(crate) fn read_elf_by_type<F, FileHeader, ProgramHeader>(
    file: &mut F
) -> Result<Elf64>
where F: FileReadWriteAtVolatile, FileHeader: AsBytes + FromBytes + Default + Into<elf64_hdr>, ProgramHeader: AsBytes + FromBytes + Clone + Default + Into<elf64_phdr>,
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.