[PATCH] libelf: Use GElf_Ehdr instead of Elf handle in __libelf_data_type

Mark Wielaard mark@klomp.org
Fri Nov 6 17:43:11 GMT 2020

On Sun, 2020-11-01 at 19:36 +0100, Mark Wielaard wrote:
> GCC with -flto detects some (very) unlikely issues in error paths.
> In theory getting the Ehdr from an Elf handle might fail. But in
> most cases where __libelf_data_type is used, we already have the
> Ehdr anyway. So simply pass that to __libelf_data_type. In the one
> place where we don't have it yet, get it and check for failure
> before calling __libelf_data_type.


More information about the Elfutils-devel mailing list