Manpage logo

gelf_getehdr - retrieve the header of an ELF binary as a class-independent structure

NAME  SYNOPSIS  DESCRIPTION  PARAMETERS  RETURN VALUE  SEE ALSO  ATTRIBUTES  REPORTING BUGS 

NAME

gelf_getehdr − retrieve the header of an ELF binary as a class−independent structure

SYNOPSIS

#include <gelf.h>

GElf_Ehdr *gelf_getehdr(Elf *elf, GElf_Ehdr *dest );

DESCRIPTION

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_Ehdr structure 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.

SEE ALSO

gelf_newehdr(3), gelf_update_ehdr(3), libelf(3), elf(5)

ATTRIBUTES

REPORTING BUGS

Report bugs to <[email protected]> or https://sourceware.org/bugzilla/.


Updated 2026-06-01 - jenkler.se | uex.se