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

elf_getscn - retrieve a descriptor for an ELF section at a specified index.

Attributes

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

Description

The elf_getscn function retrieves a section descriptor for the section at the specified index in the ELF object referred to by elf.

Name

elf_getscn - retrieve a descriptor for an ELF section at a specified index.

Parameters

elf An Elf pointer to the ELF object from which the section descriptor is to be retrieved. index A size_t value representing the index of the section whose descriptor is to be retrieved. Section indices start at 0. The section at index 0 is always SHT_NULL and does not contain any data.

Reporting Bugs

Report bugs to <elfutils-devel@sourceware.org> or https://sourceware.org/bugzilla/. Libelf 2024-07-18 ELF_GETSCN(3)

Return Value

The elf_getscn function returns a pointer to the Elf_Scn for the section at the specified index. If an error occurs, it returns NULL and sets an appropriate libelf error code.

See Also

elf_errno(3), libelf(3), elf(5)

Synopsis

#include<libelf.h>Elf_Scn*elf_getscn(Elf*elf,size_tindex);

See Also