elf32_getchdr(3)

elf32_getchdr3

Retrieve the compression header for a section from a 32-bit or 64-bit elf object file.

Usage

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

Overview

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.

Parameters

scn

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

Return value

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

Attributes

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue
elf32_getchdr(), elf64_getchdr()Thread safetyMT-Safe

Releases

Unchanged in 2 releases since Debian 13 (Trixie).

  1. 13–Arch

Reporting bugs

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

History

elf32_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.