| GELF_GETEHDR(3) | Library Functions Manual | GELF_GETEHDR(3) | 
elf32_getehdr, elf64_getehdr,
  gelf_getehdr —
#include <libelf.h>
Elf32_Ehdr *
  
  elf32_getehdr(Elf
    *elf);
Elf64_Ehdr *
  
  elf64_getehdr(Elf
    *elf);
#include
  <gelf.h>
GElf_Ehdr *
  
  gelf_getehdr(Elf
    *elf, GElf_Ehdr
    *dst);
Functions elf32_getehdr() and
    elf64_getehdr() return a pointer to the appropriate
    class-specific header descriptor if it exists in the file referenced by
    descriptor elf. These functions return
    NULL if an ELF header was not found in file
    elf.
Function gelf_getehdr() stores a
    translated copy of the header for ELF file elf into
    the descriptor pointed to by argument dst. It returns
    argument dst if successful or
    NULL in case of failure.
NULL on failure.
ELF_E_ARGUMENT]ELF_E_ARGUMENT]ELF_E_ARGUMENT]ELF_E_ARGUMENT]ELF_E_CLASS]ELF_E_HEADER]ELF_E_RESOURCE]ELF_E_SECTION]ELF_E_VERSION]| December 16, 2006 | NetBSD 10.0 |