File: gelf_getclass.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 (63 lines) | stat: -rw-r--r-- 1,088 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
63
.TH GELF_GETCLASS 3 2025-09-14 "Libelf" "Libelf Programmer's Manual"

.SH NAME
gelf_getclass \- return the ELF class (32\-bit or 64\-bit) for an object
.SH SYNOPSIS
.nf
.B #include <gelf.h>

.BI "int gelf_getclass(Elf *" elf ");"
.fi

.SH DESCRIPTION
.BR gelf_getclass ()
returns the class of the ELF object referenced by
.IR elf .
The class of a valid ELF file will be one of:
.TP
.B ELFCLASS32
The object is a 32\-bit ELF class.
.TP
.B ELFCLASS64
The object is a 64\-bit ELF class.
.PP
If
.I elf
does not denote a valid ELF object, or the class cannot be determined,
.B ELFCLASSNONE
is returned.

.SH RETURN VALUE
Returns
.B ELFCLASS32
or
.B ELFCLASS64
on success.
If
.I elf
is NULL or does not refer to a valid ELF binary with kind
.BR ELF_K_ELF ,
then
.B ELFCLASSNONE
is returned.

.SH SEE ALSO
.BR elf_kind (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_getclass ()
T}	Thread safety	MT-unsafe race
.TE

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