iPXE
Main Page
Related Pages
Modules
+
Data Structures
Data Structures
Data Structure Index
+
Data Fields
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
b
d
i
p
s
t
u
v
x
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
+
Files
File List
+
Globals
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Enumerations
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
include
elf.h
Go to the documentation of this file.
1
#ifndef ELF_H
2
#define ELF_H
3
4
/**
5
* @file
6
*
7
* ELF headers
8
*
9
*/
10
11
FILE_LICENCE
( GPL2_OR_LATER_OR_UBDL );
12
13
#include <
stdint.h
>
14
15
typedef
uint32_t
Elf32_Addr
;
16
typedef
uint16_t
Elf32_Half
;
17
typedef
uint32_t
Elf32_Off
;
18
typedef
int32_t
Elf32_Sword
;
19
typedef
uint32_t
Elf32_Word
;
20
21
/** Length of ELF identifier */
22
#define EI_NIDENT 16
23
24
/** ELF header */
25
typedef
struct
{
26
unsigned
char
e_ident[
EI_NIDENT
];
27
Elf32_Half
e_type
;
28
Elf32_Half
e_machine
;
29
Elf32_Word
e_version
;
30
Elf32_Addr
e_entry
;
31
Elf32_Off
e_phoff
;
32
Elf32_Off
e_shoff
;
33
Elf32_Word
e_flags
;
34
Elf32_Half
e_ehsize
;
35
Elf32_Half
e_phentsize
;
36
Elf32_Half
e_phnum
;
37
Elf32_Half
e_shentsize
;
38
Elf32_Half
e_shnum
;
39
Elf32_Half
e_shstrndx
;
40
}
Elf32_Ehdr
;
41
42
/* ELF identifier indexes */
43
#define EI_MAG0 0
44
#define EI_MAG1 1
45
#define EI_MAG2 2
46
#define EI_MAG3 3
47
#define EI_CLASS 4
48
#define EI_DATA 5
49
#define EI_VERSION 6
50
51
/* ELF magic signature bytes */
52
#define ELFMAG0 0x7f
53
#define ELFMAG1 'E'
54
#define ELFMAG2 'L'
55
#define ELFMAG3 'F'
56
57
/* ELF classes */
58
#define ELFCLASS32 1
59
60
/* ELF data encodings */
61
#define ELFDATA2LSB 1
62
63
/* ELF versions */
64
#define EV_CURRENT 1
65
66
/** ELF program header */
67
typedef
struct
{
68
Elf32_Word
p_type
;
69
Elf32_Off
p_offset
;
70
Elf32_Addr
p_vaddr
;
71
Elf32_Addr
p_paddr
;
72
Elf32_Word
p_filesz
;
73
Elf32_Word
p_memsz
;
74
Elf32_Word
p_flags
;
75
Elf32_Word
p_align
;
76
}
Elf32_Phdr
;
77
78
/* ELF segment types */
79
#define PT_LOAD 1
80
81
#endif
/* ELF_H */
Elf32_Phdr::p_paddr
Elf32_Addr p_paddr
Definition:
elf.h:71
uint16_t
unsigned short uint16_t
Definition:
stdint.h:11
Elf32_Ehdr::e_shoff
Elf32_Off e_shoff
Definition:
elf.h:32
Elf32_Ehdr::e_version
Elf32_Word e_version
Definition:
elf.h:29
Elf32_Ehdr
ELF header.
Definition:
elf.h:25
Elf32_Ehdr::e_flags
Elf32_Word e_flags
Definition:
elf.h:33
Elf32_Half
uint16_t Elf32_Half
Definition:
elf.h:16
Elf32_Ehdr::e_type
Elf32_Half e_type
Definition:
elf.h:27
Elf32_Ehdr::e_shnum
Elf32_Half e_shnum
Definition:
elf.h:38
Elf32_Sword
int32_t Elf32_Sword
Definition:
elf.h:18
EI_NIDENT
#define EI_NIDENT
Length of ELF identifier.
Definition:
elf.h:22
Elf32_Ehdr::e_phentsize
Elf32_Half e_phentsize
Definition:
elf.h:35
Elf32_Word
uint32_t Elf32_Word
Definition:
elf.h:19
Elf32_Phdr::p_memsz
Elf32_Word p_memsz
Definition:
elf.h:73
Elf32_Addr
uint32_t Elf32_Addr
Definition:
elf.h:15
Elf32_Phdr::p_align
Elf32_Word p_align
Definition:
elf.h:75
Elf32_Ehdr::e_shstrndx
Elf32_Half e_shstrndx
Definition:
elf.h:39
FILE_LICENCE
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
Elf32_Phdr::p_vaddr
Elf32_Addr p_vaddr
Definition:
elf.h:70
Elf32_Phdr::p_filesz
Elf32_Word p_filesz
Definition:
elf.h:72
Elf32_Ehdr::e_phoff
Elf32_Off e_phoff
Definition:
elf.h:31
Elf32_Ehdr::e_entry
Elf32_Addr e_entry
Definition:
elf.h:30
Elf32_Ehdr::e_shentsize
Elf32_Half e_shentsize
Definition:
elf.h:37
Elf32_Off
uint32_t Elf32_Off
Definition:
elf.h:17
Elf32_Phdr::p_type
Elf32_Word p_type
Definition:
elf.h:68
uint32_t
unsigned int uint32_t
Definition:
stdint.h:12
Elf32_Phdr::p_offset
Elf32_Off p_offset
Definition:
elf.h:69
Elf32_Ehdr::e_phnum
Elf32_Half e_phnum
Definition:
elf.h:36
int32_t
signed int int32_t
Definition:
stdint.h:17
Elf32_Ehdr::e_machine
Elf32_Half e_machine
Definition:
elf.h:28
Elf32_Ehdr::e_ehsize
Elf32_Half e_ehsize
Definition:
elf.h:34
stdint.h
Elf32_Phdr::p_flags
Elf32_Word p_flags
Definition:
elf.h:74
Elf32_Phdr
ELF program header.
Definition:
elf.h:67
Generated by
1.8.15