GELF_NEWEHDR(3) | NetBSD Library Functions Manual | GELF_NEWEHDR(3) |
Elf32_Ehdr *
elf32_newehdr(Elf *elf);
Elf64_Ehdr *
elf64_newehdr(Elf *elf);
#include <gelf.h>
void *
gelf_newehdr(Elf *elf, int elfclass);
Function elf32_newehdr() returns a pointer to a 32 bit Elf32_Ehdr structure. Function elf64_newehdr() returns a pointer to a 64 bit Elf64_Ehdr structure.
When argument elfclass has value ELFCLASS32, function gelf_newehdr() returns the value returned by elf32_newehdr(elf). When argument elfclass has value ELFCLASS64 it returns the value returned by elf64_newehdr(elf).
If a fresh header structure is allocated, the members of the structure are initialized as follows:
Other members of the header are set to zero. The application is responsible for changing these values as needed before calling elf_update().
If successful, these three functions set the ELF_F_DIRTY flag on ELF descriptor elf.
October 22, 2007 | NetBSD 5.99 |