FreeBSD 7.0 manual page repository

FreeBSD is a free computer operating system based on BSD UNIX originally. Many IT companies, like DeployIS is using it to provide an up-to-date, stable operating system.

elf32_getshdr, elf64_getshdr, gelf_getshdr - retrieve the class-dependent

 

NAME

      elf32_getshdr, elf64_getshdr, gelf_getshdr - retrieve the class-dependent
      section header
 

LIBRARY

      library “libelf”
 

SYNOPSIS

      #include <libelf.h>
 
      Elf32_Shdr *
      elf32_getshdr(Elf_Scn *scn);
 
      Elf64_Shdr *
      elf64_getshdr(Elf_Scn *scn);
 
      #include <gelf.h>
 
      GElf_Shdr *
      gelf_getshdr(Elf_Scn *scn, GElf_Shdr *shdr);
 

DESCRIPTION

      These functions return a pointer to the ELF Section Header data structure
      associated with section descriptor scn.
 
      Function elf32_getshdr() retrieves a pointer to an Elf32_Shdr structure.
      Section descriptor scn must be associated with an ELF descriptor of class
      ELFCLASS32.
 
      Function elf64_getshdr() retrieves a pointer to an Elf64_Shdr structure.
      Section descriptor scn must be associated with an ELF descriptor of class
      ELFCLASS64.
 
      Function gelf_getshdr() copies the values in the section header associ‐
      ated with argument scn to the structure pointed to be argument dst.  The
      GElf_Shdr data structure is described in gelf(3).
      Functions elf32_getshdr() and elf64_getshdr() return a valid pointer to
      the appropriate section header on success or NULL if an error was encoun‐
      tered.
 
      Function gelf_getshdr() returns argument dst if successful, or NULL if an
      error was encountered.
 

ERRORS

      These functions may fail with the following errors:
 
      [ELF_E_ARGUMENT]  Arguments scn or shdr were NULL.
 
      [ELF_E_ARGUMENT]  Argument scn was not associated a descriptor for an ELF
                        object.
 
      [ELF_E_CLASS]     The ELF class associated with the section descriptor
                        scn did not match the class expected by the API.
      elf(3), elf_getscn(3), gelf(3), gelf_update_shdr(3)
 

Sections

Based on BSD UNIX
FreeBSD is an advanced operating system for x86 compatible (including Pentium and Athlon), amd64 compatible (including Opteron, Athlon64, and EM64T), UltraSPARC, IA-64, PC-98 and ARM architectures. It is derived from BSD, the version of UNIX developed at the University of California, Berkeley. It is developed and maintained by a large team of individuals. Additional platforms are in various stages of development.