File: elf_getscn.3

package info (click to toggle)
elfutils 0.194-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 27,680 kB
  • sloc: ansic: 114,970; sh: 35,537; cpp: 4,998; makefile: 1,986; yacc: 1,388; lex: 130; asm: 77; sed: 39; awk: 35
file content (60 lines) | stat: -rw-r--r-- 1,306 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.TH ELF_GETSCN 3 2024-07-18 "Libelf" "Libelf Programmer's Manual"

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

.SH SYNOPSIS
.B #include <libelf.h>

.BI "Elf_Scn *elf_getscn(Elf *" elf ", size_t " index ");"

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

.SH PARAMETERS
.TP
.I elf
An
.I Elf
pointer to the ELF object from which the section descriptor is to be retrieved.

.TP
.I index
A
.I 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
.B SHT_NULL
and does not contain any data.

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

.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
.TS
allbox;
lbx lb lb
l l l.
Interface	Attribute	Value
T{
.na
.nh
.BR elf_getscn ()
T}	Thread safety	MT-Safe
.TE

.SH SEE ALSO
.BR elf_errno (3),
.BR libelf (3),
.BR elf (5)

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