fn load_elf_file<'data>(
    filename: &str,
    filedata: &'data [u8]
) -> Result<object::read::File<'data>, String> {
    match object::File::parse(&*filedata) {
        Ok(file) => Ok(file),
        Err(err) => {
            Err(format!("Error: Failed to parse file '{}': {}", filename, err))
        }
    }
}
// read the headers and sections of an elf/object file
read the headers and sections of an elf/object file
read the headers and sections of an elf / object file
fn load_elf_file<'data>(
    filename: &str,
    filedata: &'data [u8]
) -> Result<object::read::File<'data>, String> {
    match object::File::parse(&*filedata) {
        Ok(file) => Ok(file),
        Err(err) => {
            Err(format!("Error: Failed to parse file '{}': {}", filename, err))
        }
    }
}
fn load_elf_file < ' data > ( filename : & str , filedata : & ' data [ u8 ] ) -> Result < object :: read :: File < ' data > , String > { match object :: File :: parse ( & * filedata ) { Ok ( file ) => Ok ( file ) , Err ( err ) => { Err ( format ! ( " " filename err ) ) } } }
read the headers and sections of an elf/object file
read the headers and sections of an elf / object file
filename
&str
filedata
&'data [u8]