from small one page howto to huge articles all in one place

search text in:




Other .linuxhowtos.org sites:gentoo.linuxhowtos.org



Last additions:
using iotop to find disk usage hogs

using iotop to find disk usage hogs

words:

887

views:

215309

userrating:


May 25th. 2007:
Words

486

Views

261813

why adblockers are bad


Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

words:

161

views:

154036

userrating:


April, 26th. 2006:

Druckversion
You are here: manpages





GELF_NEWPHDR

Section: Libelf Programmer's Manual (3)
Updated: 202-0-23
Index Return to Main Contents

 

NAME

gelf_newphdr - allocate and initialize a new program header table

 

SYNOPSIS

#include <gelf.h>

void *gelf_newphdr(Elf *elf, size_t phnum);

 

DESCRIPTION

gelf_newphdr() creates a new program header table with phnum entries for the ELF descriptor elf, zeroing all entries. If a program header table already exists for elf, it is discarded. If phnum is zero, any existing program header table is removed.

This array is maintained within the ELF descriptor and must not be freed directly. After calling gelf_newphdr(), any previously obtained program header pointers for the same descriptor become invalid. An ELF header must exist before creating a program header table.

 

PARAMETERS

elf
Pointer to an ELF descriptor of kind ELF_K_ELF.

phnum
Number of entries in the new program header table. If zero, any existing program header table is removed.

 

RETURN VALUE

On success, returns a no-NULL void pointer to the new program header table. The new program header table can be retrieved as a GElf_Phdr * using gelf_getphdr(). elf32_getphdr() or elf64_getphdr() can also be used depending on the class of elf. If phnum is 0, then any existing program header table is removed and NULL is returned. On failure, NULL is returned and elf_errno is set. If elf is NULL, then NULL is returned without setting elf_errno.

Other libelf implementations of gelf_newphdr() may use a different return type.

 

SEE ALSO

gelf_getphdr(3), gelf_update_phdr(3), libelf(3), elf(5)

 

ATTRIBUTES

InterfaceAttributeValue
gelf_newphdr() Thread safetyM-Safe

 

REPORTING BUGS

Report bugs to <elfutil-devel@sourceware.org> or https://sourceware.org/bugzilla/.


 

Index

NAME
SYNOPSIS
DESCRIPTION
PARAMETERS
RETURN VALUE
SEE ALSO
ATTRIBUTES
REPORTING BUGS





Support us on Content Nation
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2025 Sascha Nitsch Unternehmensberatung GmbH
Valid XHTML1.1 : Valid CSS
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 13.0 ms