logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Attributes

For an explanation of the terms used in this section, see attributes(7). ┌─────────────────────────────────────────────────────────────────────────────┬───────────────┬─────────┐ │ InterfaceAttributeValue │ ├─────────────────────────────────────────────────────────────────────────────┼───────────────┼─────────┤ │ elf64_offscn() │ Thread safety │ MT-Safe │ └─────────────────────────────────────────────────────────────────────────────┴───────────────┴─────────┘

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.

History

elf64_offscn first appeared in elfutils 0.112. This elfutils libelf function may not be found in other libelf implementations. Libelf 2024-07-18 ELF64_OFFSCN(3)

Name

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

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.

Reporting Bugs

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

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.

See Also

elf32_offscn(3), libelf(3), elf(5),

Synopsis

#include<libelf.h>Elf_Scn*elf64_offscn(Elf*elf,off_toffset);

See Also