[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    elf32_getshdr(3E) manual page Table of Contents

Name

elf32_getshdr - retrieve class-dependent section header

Synopsis

cc [ flag ... ] file ... -lelf [ library ... ]

#include <libelf.h>

Elf32_Shdr *elf32_getshdr(Elf_Scn *scn);

MT-Level

Unsafe

Description

For a 32-bit class file, elf32_getshdr() returns a pointer to a section header for the section descriptor scn. Otherwise, the file is not a 32-bit class file, scn was null, or an error occurred; elf32_getshdr() then returns null.

The header includes the following members.


    Elf32_Word    sh_name;
    Elf32_Word    sh_type;
    Elf32_Word    sh_flags;
    Elf32_Addr    sh_addr;
    Elf32_Off    sh_offset;
    Elf32_Word    sh_size;
    Elf32_Word    sh_link;
    Elf32_Word    sh_info;
    Elf32_Word    sh_addralign;
    Elf32_Word    sh_entsize;

If the program is building a new file, it is responsible for creating the file’s ELF header before creating sections.

See Also

elf(3E) , elf_flagdata(3E) , elf_getscn(3E) , elf_strptr(3E)


Table of Contents