File: elf_kind.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 (73 lines) | stat: -rw-r--r-- 1,175 bytes parent folder | download | duplicates (2)
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
63
64
65
66
67
68
69
70
71
72
73
.TH ELF_KIND 3 2025-03-31 "Libelf" "Libelf Programmer's Manual"

.SH NAME
elf_kind \- Determine the type of file represented by an ELF descriptor.

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

.BI "Elf_Kind elf_kind(Elf *" elf ");"

.SH DESCRIPTION
The
.B elf_kind
function determines the file type of the file represented by
.IR elf .
This type identifies whether the descriptor represents an
ELF object, an archive member, or some other type of file.

.SH PARAMETERS
.TP
.I elf
The ELF descriptor.

.SH RETURN VALUE
The file type of the file represented by
.IR elf .
The possible return value are

.RS
.TP
.PD 0
.TP
.TP
.B ELF_K_NONE
Unknown file type.

.TP
.B ELF_K_AR
Archive member.

.TP
.B ELF_K_COFF
COFF object file. COFF is not supported by elfutils libelf.

.TP
.B ELF_K_ELF
ELF object file.


.SH SEE ALSO
.BR ar (1),
.BR ranlib (1),
.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 elf_kind ()
T}	Thread safety	MT-Safe
.TE

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