logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

elf32_getchdr, elf64_getchdr - retrieve the compression header for a section from a 32-bit or 64-bit ELF

Attributes

For an explanation of the terms used in this section, see attributes(7). ┌─────────────────────────────────────────────────────────────────────────────┬───────────────┬─────────┐ │ InterfaceAttributeValue │ ├─────────────────────────────────────────────────────────────────────────────┼───────────────┼─────────┤ │ elf32_getchdr(), elf64_getchdr() │ Thread safety │ MT-Safe │ └─────────────────────────────────────────────────────────────────────────────┴───────────────┴─────────┘

Description

Retrieve the compression header for a section with compressed data. Sections with compressed data are indicated with the SHF_COMPRESSED flag. See libelf(3) for more information regarding the compression header.

History

elf32_getchdr first appeared in elfutils 0.165. Libelf 2024-08-14 ELF32_GETCHDR(3)

Name

elf32_getchdr, elf64_getchdr - retrieve the compression header for a section from a 32-bit or 64-bit ELF object file.

Parameters

scn Section whose compression header will be retrieved. The section's SHF_COMPRESSED flag must be set.

Reporting Bugs

Report bugs to <elfutils-devel@sourceware.org> or https://sourceware.org/bugzilla/.

Return Value

On success, return a pointer to the compression header. On failure, return NULL and set a libelf error code.

See Also

elf_compress(3), elf_errno(3), libelf(3), elf(5)

Synopsis

#include<libelf.h>Elf32_Chdr*elf32_getchdr(Elf_Scn*scn);Elf64_Chdr*elf64_getchdr(Elf_Scn*scn);

See Also