On 2 March 2016 at 06:56, Peter Crosthwaite <[email protected]> wrote: > Add an API to load an elf header header from a file. Populates a > buffer with the header contents, as well as a boolean for whether the > elf is 64b or not. Both arguments are optional. > > Signed-off-by: Peter Crosthwaite <[email protected]> > --- > Changed since v1 (PMM review): > Add filname to error messages > Remove unneeded lseek() > Add doc comment > +/** load_elf_hdr: > + * @filename: Path of ELF file > + * @hdr: Buffer to populate with header data. Header data will not be > + * filled if set to NULL. > + * @is64: Set to true if the ELF is 64bit. Ignored if set to NULL > + * @errp: Populated with an error in failure cases > + * > + * Inspect as ELF file's header. Read its full header contents into a
"an". > + * buffer and/or determine if the ELF is 64bit. > + */ Otherwise Reviewed-by: Peter Maydell <[email protected]> thanks -- PMM
