diff options
| author | Mark Wielaard <[email protected]> | 2020-11-01 18:50:04 +0100 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2020-11-06 18:39:40 +0100 |
| commit | f2272dbefd6dbd67af4d46eb6e748522c0c60d74 (patch) | |
| tree | 7e93ec8e6a73ff3db5d30add0a2543b2c38d6569 /libelf/elf_getphdrnum.c | |
| parent | 6105277a598b3e608b9297c579553a851658fa41 (diff) | |
libelf: Use GElf_Ehdr instead of Elf handle in __libelf_data_type
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.
Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'libelf/elf_getphdrnum.c')
0 files changed, 0 insertions, 0 deletions
