User Tools

Site Tools


solaris:elf32_getchdr.3elf

elf32_getchdr


NAME

elf32_getchdr, elf64_getchdr - retrieve class-dependent compression header

SYNOPSIS

cc [ flag … ] file-lelf [ library … ]
#include <libelf.h>

Elf32_Chdr *elf32_getchdr(Elf_Scn *scn);

Elf64_Chdr *elf64_getchdr(Elf_Scn *scn);

DESCRIPTION

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

The elf32_getchdr header includes the following members:

Elf32_Word ch_type;
Elf32_Word ch_size;
Elf32_Word ch_addralign;

while the elf64_getchdr header includes the following members:

Elf64_Word ch_type;
Elf64_Xword ch_size;
Elf64_Xword ch_addralign;

For the 64-bit class, replace 32 with 64 as appropriate.

NOTES

elf32_chdr() and elf64_chdr() understand the standard ELF compression format, indicated by the presence of the SHF_COMPRESSED section header flag. These routines are unable to process sections formatted in the original GNU compression format. The original GNU compression format is deprecated. See elf_compress_gnu(3ELF).

ATTRIBUTES

See attributes(7) for descriptions of the following attributes:

SEE ALSO

elf(3ELF), elf_compress(3ELF), elf_compress_gnu(3ELF), libelf(3LIB), attributes(7)


solaris/elf32_getchdr.3elf.txt · Last modified: 2023/07/19 08:57 by A User Not Logged in