File: gelf_getehdr.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 (62 lines) | stat: -rw-r--r-- 1,153 bytes parent folder | download
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
61
62
.TH GELF_GETEHDR 3 2025-09-14 "Libelf" "Libelf Programmer's Manual"

.SH NAME
gelf_getehdr \- retrieve the header of an ELF binary as a class\-independent structure

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

.BI "GElf_Ehdr *gelf_getehdr(Elf *" elf ", GElf_Ehdr *" dest " );"
.fi

.SH DESCRIPTION
.B gelf_getehdr()
retrieve the ELF header of the binary referenced by
.I elf
as a class\-independent
.B GElf_Ehdr
representation.

.SH PARAMETERS
.TP
.I elf
Pointer to an ELF descriptor.
.TP
.I dest
Pointer to a caller\-provided
.B GElf_Ehdr
structure that will receive the translated file header. Must not be
NULL.  On success, the function stores the header in
.IR *dest .

.SH RETURN VALUE
On success, returns
.IR dest .
On failure, returns
.B NULL
and sets elf_errno.  If
.I elf
is NULL, NULL is returned and elf_errno is not set.

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

.SH ATTRIBUTES
.TS
allbox;
lbx lb lb
l l l.
Interface	Attribute	Value
T{
.na
.nh
.BR gelf_getehdr ()
T}	Thread safety	MT-Safe
.TE

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