gelf_getehdr3
Retrieve the header of an elf binary as a class-independent structure
Usage
#include <gelf.h> GElf_Ehdr *gelf_getehdr(Elf *elf, GElf_Ehdr *dest );
Overview
gelf_getehdr() retrieve the ELF header of the binary referenced by elf as a class-independent GElf_Ehdr representation.
Parameters
- elf
-
Pointer to an ELF descriptor.
- dest
-
Pointer to a caller-provided
GElf_Ehdrstructure that will receive the translated file header. Must not be NULL. On success, the function stores the header in *dest.
Return value
On success, returns dest. On failure, returns NULL and sets elf_errno. If elf is NULL, NULL is returned and elf_errno is not set.
Attributes
| Interface | Attribute | Value |
| gelf_getehdr() | Thread safety | MT-Safe |