elf32_getehdr - Man Page
retrieve the ELF header for a 32-bit ELF descriptor
Synopsis
#include <libelf.h> Elf32_Ehdr *elf32_getehdr(Elf *elf);
Description
elf32_getehdr retrieves the ELF header for the given 32-bit ELF descriptor elf. The ELF header contains crucial metadata about the ELF file, such as the type, machine, version, entry point, program header table offset, and section header table offset. See elf(5) for more information regarding the ELF header.
Parameters
- elf
Pointer to the ELF descriptor from which to retrieve the ELF header.
Return Value
On success, elf32_getehdr returns a pointer to the Elf32_Ehdr structure. If the ELF descriptor is invalid or not a 32-bit ELF, it returns NULL and sets an error code retrievable by elf_errno(3).
See Also
Reporting Bugs
Report bugs to <elfutils-devel@sourceware.org> or https://sourceware.org/bugzilla/.
Referenced By
2024-06-26 Libelf Programmer's Manual