blob: dadc81383c0f1d1fed6760ae89d2fae9abb87753 (
plain)
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
|
.TH ELF32_GETEHDR 3 2024-06-26 "Libelf" "Libelf Programmer's Manual"
.SH NAME
elf32_getehdr \- retrieve the ELF header for a 32-bit ELF descriptor
.SH SYNOPSIS
.nf
#include <libelf.h>
Elf32_Ehdr *elf32_getehdr(Elf *elf);
.fi
.SH DESCRIPTION
.B elf32_getehdr
retrieves the ELF header for the given 32-bit ELF descriptor
.I elf.
The ELF header contains crucial metadata about the ELF file, such as the type, machine, version, entry point, program header table offset, and section header table offset. See
.BR elf (5)
for more information regarding the ELF header.
.SH PARAMETERS
.TP
.I elf
Pointer to the ELF descriptor from which to retrieve the ELF header.
.SH RETURN VALUE
On success,
.B elf32_getehdr
returns a pointer to the
.B Elf32_Ehdr
structure. If the ELF descriptor is invalid or not a 32-bit ELF, it returns NULL and sets an error code retrievable by
.BR elf_errno (3).
.SH SEE ALSO
.BR elf64_getehdr (3),
.BR elf_begin (3),
.BR elf_errno (3),
.BR elf (5)
.SH REPORTING BUGS
Report bugs to <elfutils-devel@sourceware.org> or https://sourceware.org/bugzilla/.
|