elf32_offscn(3)

elf32_offscn3

Retrieve a section descriptor by file offset for a 32-bit elf file

Usage

#include <libelf.h>

Elf_Scn *elf32_offscn(Elf *elf, off_t offset);

Overview

The elf32_offscn function retrieves the section descriptor for the non-empty section at the specified file offset in the ELF32 object referred to by elf.

Parameters

elf

An Elf pointer to the ELF object from which the section descriptor is to be retrieved.

offset

An off_t value representing the file offset of the section whose descriptor is to be retrieved.

Return value

The elf32_offscn function returns a pointer to the Elf_Scn of the non-empty section with a sh_offset matching offset. If an error occurs, it returns NULL and sets an appropriate libelf error code.

Attributes

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

InterfaceAttributeValue
elf32_offscn()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_offscn first appeared in elfutils 0.112. This elfutils libelf function may not be found in other libelf implementations.

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