gelf_getchdr(3)

gelf_getchdr3

Retrieve the class-independent compression header for an elf section with compressed data.

Usage

#include <gelf.h>
GElf_Chdr *gelf_getchdr (Elf_Scn *scn, GElf_Chdr *dest);

Overview

Retrieve the class-independent compression header for section scn with compressed data and store it in dest. Sections with compressed data are indicated with the SHF_COMPRESSED flag. See libelf(3) for more information regarding the compression header.

Parameters

scn

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

dest

Pointer to a caller-provided GElf_Chdr structure that will receive the class-independent compression header for scn.

Return value

On success, this function returns dest. On failure, it returns NULL and sets elf_errno. If scn is NULL, then NULL is returned and elf_errno is not set.

Attributes

InterfaceAttributeValue
gelf_getchdr()Thread safetyMT-Safe

Reporting bugs

Report bugs to <[email protected]> or https://sourceware.org/bugzilla/.

History

gelf_getchdr first appeared in elfutils 0.165.

From libelf 0.197-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.