ELF64\_OFFSCN(3) Libelf Programmer's Manual ELF64\_OFFSCN(3)

# [NAME](#NAME)

elf64\_offscn - retrieve a section descriptor by file offset for a 64-bit ELF file

# [SYNOPSIS](#SYNOPSIS)

**#include &lt;libelf.h&gt;**

**Elf\_Scn \*elf64\_offscn(Elf \*elf, off\_t offset);**

# [DESCRIPTION](#DESCRIPTION)

The **elf64\_offscn** function retrieves the section descriptor for the non-empty section at the specified file offset in the ELF64 object referred to by *elf.*

# [PARAMETERS](#PARAMETERS)

[*elf*](#elf)

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

[*offset*](#offset)

An *off\_t* value representing the file offset of the section whose descriptor is to be retrieved.

# [RETURN VALUE](#RETURN_VALUE)

The **elf64\_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](#ATTRIBUTES)

For an explanation of the terms used in this section, see [**attributes**(7)](/man/os/elfutils/attributes.7).

**Interface** **Attribute** **Value** elf64\_offscn () Thread safety MT-Safe

# [SEE ALSO](#SEE_ALSO)

[**elf32\_offscn**(3)](/man/os/elfutils/elf32_offscn.3), [**libelf**(3)](/man/os/elfutils/libelf.3), [**elf**(5)](/man/os/elfutils/elf.5),

# [REPORTING BUGS](#REPORTING_BUGS)

Report bugs to &lt;elfutils-devel@sourceware.org&gt; or https://sourceware.org/bugzilla/.

# [HISTORY](#HISTORY)

**elf64\_offscn** first appeared in elfutils 0.112. This elfutils libelf function may not be found in other libelf implementations.

2024-07-18 Libelf

---

Document: elf64_offscn(3) from elfutils 0.196-r0 (Chainguard OS)
Source: https://sourceware.org/git/elfutils.git
