File: elf32_getshdr.3

package info (click to toggle)
elfutils 0.194-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 28,848 kB
  • sloc: ansic: 115,014; sh: 35,537; cpp: 4,998; makefile: 1,986; yacc: 1,388; lex: 130; asm: 77; sed: 39; awk: 35
file content (59 lines) | stat: -rw-r--r-- 1,273 bytes parent folder | download | duplicates (5)
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
.TH ELF32_GETSHDR 3 2024-08-14 "Libelf" "Libelf Programmer's Manual"

.SH NAME
elf32_getshdr, elf64_getshdr \- retrieve the section header for a section
in 32-bit or 64-bit ELF object file

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

.BI "Elf32_Shdr *elf32_getshdr(Elf_Scn *" scn ");"
.BI "Elf64_Shdr *elf64_getshdr(Elf_Scn *" scn ");"

.SH DESCRIPTION
Retrieve the section header for the section referred to by
.IR scn .
If the retrieved section header is modified,
.B elf_flagshdr
must be called
with
.B ELF_C_SET
and
.B ELF_F_DIRTY
in order to write the modified section header to disk.

.SH PARAMETERS
.TP
.I scn
The section descriptor whose section header is to be retrieved.

.SH RETURN VALUE
On success, return a pointer to the section header.  If scn is NULL then
NULL will be returned.  If an error occurs, return NULL and set a libelf
error code.

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

.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 elf32_getshdr (),
.BR elf64_getshdr ()
T}	Thread safety	MT-Safe
.TE

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