elf_getshdr(S-osr5)
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-osr5)
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-osr5).
See also
elf(S-osr5),
elf_flag(S-osr5),
elf_getscn(S-osr5),
elf_strptr(S-osr5)
Standards conformance
elf32_getshdr(S-osr5)
is not part of any currently supported standard;
it was developed by UNIX System Laboratories, Inc.
and is maintained by The SCO Group.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005