GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
GELF_UPDATE_EHDR(3) FreeBSD Library Functions Manual GELF_UPDATE_EHDR(3)

gelf_update_ehdr, gelf_update_phdr, gelf_update_shdr
update underlying ELF data structures

ELF Access Library (libelf, -lelf)

#include <gelf.h>

int
gelf_update_ehdr(Elf *elf, GElf_Ehdr *ehdr);

int
gelf_update_phdr(Elf *elf, int ndx, GElf_Phdr *phdr);

int
gelf_update_shdr(Elf_Scn *scn, GElf_Shdr *shdr);

These functions are used to update ELF data structures on the underlying ELF descriptor. Class-dependent data structures in the underlying ELF descriptor are updated using the data in the class-independent GElf descriptors and the underlying ELF data structures are marked “dirty”. The conversion process signals an error if the values being copied to the target ELF data structure would exceed representation limits. GElf descriptors are described in gelf(3).

Function gelf_update_ehdr() updates the ELF Executable Header with the values in the class-independent executable header ehdr.

Function gelf_update_phdr() updates the ELF Program Header structure at index ndx with the values in the class-independent program header phdr.

Function gelf_update_shdr() updates the ELF Section Header structure associated with section descriptor scn with the values in argument shdr.

These functions return a non-zero integer on success, or zero in case of an error.

These functions may fail with the following errors:
[]
Arguments elf, ehdr, phdr, scn, or shdr were NULL.
[]
Argument elf was not a descriptor for an ELF object.
[]
Argument elf had an unsupported ELF class.
[]
Argument ndx exceeded the number of entries in the program header table.
[]
Section descriptor scn was not associated with an ELF descriptor.
[]
ELF descriptor elf was not opened for writing or updating.
[]
An out of memory condition was detected.

elf(3), elf_flagelf(3), elf_flagphdr(3), elf_flagshdr(3), gelf(3), gelf_getehdr(3), gelf_getphdr(3), gelf_getshdr(3)
August 27, 2006 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.