---
name: "elf64_offscn"
section: "3"
platform: "linux"
package: "libelf"
version: "0.197-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/elf64_offscn"
---

# elf64\_offscn(3)

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

## NAME

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

## SYNOPSIS

**#include \<libelf.h\>**

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

## 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

- *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 **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

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

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

## SEE ALSO

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

## REPORTING BUGS

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

## HISTORY

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