elf_getshdr(S)
elf_getshdr: elf32_getshdr --
retrieve class-dependent section header
Syntax
cc [flag . . . ] file . . . -lelf [library] . . .
#include <libelf.h>
Elf32_Shdr *elf32_getshdr(Elf_Scn *scn);
Description
For a 32-bit class file,
elf_getshdr(S)
returns a pointer to a section header for the section descriptor
scn.
If
elf_getshdr( )
returns NULL,
the file is not a 32-bit class file,
scn was null,
or an error occurred.
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 must create the file's
ELF
header before creating sections.
Diagnostics
Error conditions are identified through the routine
elf_error(S).
See also
elf(S),
elf_flag(S),
elf_getscn(S),
elf_strptr(S)
Standards conformance
elf32_getshdr(S)
is not part of any currently supported standard;
it was developed by UNIX System Laboratories, Inc.
and is maintained by The SCO Group.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003