Xen Test Framework
include
xtf
elf.h
Go to the documentation of this file.
1
#ifndef XTF_ELF_H
2
#define XTF_ELF_H
3
4
#include <
xtf/types.h
>
5
6
typedef
uint32_t
Elf32_Addr
;
7
typedef
uint32_t
Elf32_Off
;
8
typedef
uint16_t
Elf32_Half
;
9
typedef
int32_t
Elf32_Sword
;
10
typedef
uint32_t
Elf32_Word
;
11
12
typedef
uint64_t
Elf64_Addr
;
13
typedef
uint64_t
Elf64_Off
;
14
typedef
uint16_t
Elf64_Half
;
15
typedef
int32_t
Elf64_Sword
;
16
typedef
uint32_t
Elf64_Word
;
17
typedef
int64_t
Elf64_Sxword
;
18
typedef
uint64_t
Elf64_Xword
;
19
20
#define EI_MAG0 0
21
#define EI_MAG1 1
22
#define EI_MAG2 2
23
#define EI_MAG3 3
24
#define EI_CLASS 4
25
#define EI_NIDENT 16
26
27
#define ELFMAG0 0x7f
28
#define ELFMAG1 'E'
29
#define ELFMAG2 'L'
30
#define ELFMAG3 'F'
31
32
#define ELFCLASSNONE 0
33
#define ELFCLASS32 1
34
#define ELFCLASS64 2
35
#define ELFCLASSNUM 3
36
37
typedef
struct
{
38
unsigned
char
e_ident[
EI_NIDENT
];
39
Elf32_Half
e_type
;
40
Elf32_Half
e_machine
;
41
Elf32_Word
e_version
;
42
Elf32_Addr
e_entry
;
43
Elf32_Off
e_phoff
;
44
Elf32_Off
e_shoff
;
45
Elf32_Word
e_flags
;
46
Elf32_Half
e_ehsize
;
47
Elf32_Half
e_phentsize
;
48
Elf32_Half
e_phnum
;
49
Elf32_Half
e_shentsize
;
50
Elf32_Half
e_shnum
;
51
Elf32_Half
e_shstrndx
;
52
}
Elf32_Ehdr
;
53
54
typedef
struct
{
55
Elf32_Word
sh_name
;
56
Elf32_Word
sh_type
;
57
Elf32_Word
sh_flags
;
58
Elf32_Addr
sh_addr
;
59
Elf32_Off
sh_offset
;
60
Elf32_Word
sh_size
;
61
Elf32_Word
sh_link
;
62
Elf32_Word
sh_info
;
63
Elf32_Word
sh_addralign
;
64
Elf32_Word
sh_entsize
;
65
}
Elf32_Shdr
;
66
67
typedef
struct
{
68
Elf64_Word
sh_name
;
69
Elf64_Word
sh_type
;
70
Elf64_Xword
sh_flags
;
71
Elf64_Addr
sh_addr
;
72
Elf64_Off
sh_offset
;
73
Elf64_Xword
sh_size
;
74
Elf64_Word
sh_link
;
75
Elf64_Word
sh_info
;
76
Elf64_Xword
sh_addralign
;
77
Elf64_Xword
sh_entsize
;
78
}
Elf64_Shdr
;
79
80
#endif
/* XTF_ELF_H */
81
82
/*
83
* Local variables:
84
* mode: C
85
* c-file-style: "BSD"
86
* c-basic-offset: 4
87
* tab-width: 4
88
* indent-tabs-mode: nil
89
* End:
90
*/
Elf32_Half
uint16_t Elf32_Half
Definition:
elf.h:8
Elf32_Sword
int32_t Elf32_Sword
Definition:
elf.h:9
Elf64_Sword
int32_t Elf64_Sword
Definition:
elf.h:15
Elf32_Addr
uint32_t Elf32_Addr
Definition:
elf.h:6
Elf64_Xword
uint64_t Elf64_Xword
Definition:
elf.h:18
Elf64_Sxword
int64_t Elf64_Sxword
Definition:
elf.h:17
Elf32_Off
uint32_t Elf32_Off
Definition:
elf.h:7
Elf64_Off
uint64_t Elf64_Off
Definition:
elf.h:13
Elf64_Word
uint32_t Elf64_Word
Definition:
elf.h:16
Elf64_Half
uint16_t Elf64_Half
Definition:
elf.h:14
EI_NIDENT
#define EI_NIDENT
Definition:
elf.h:25
Elf64_Addr
uint64_t Elf64_Addr
Definition:
elf.h:12
Elf32_Word
uint32_t Elf32_Word
Definition:
elf.h:10
uint32_t
__UINT32_TYPE__ uint32_t
Definition:
stdint.h:16
int32_t
__INT32_TYPE__ int32_t
Definition:
stdint.h:11
uint64_t
__UINT64_TYPE__ uint64_t
Definition:
stdint.h:17
uint16_t
__UINT16_TYPE__ uint16_t
Definition:
stdint.h:15
int64_t
__INT64_TYPE__ int64_t
Definition:
stdint.h:12
Elf32_Ehdr
Definition:
elf.h:37
Elf32_Ehdr::e_entry
Elf32_Addr e_entry
Definition:
elf.h:42
Elf32_Ehdr::e_machine
Elf32_Half e_machine
Definition:
elf.h:40
Elf32_Ehdr::e_shnum
Elf32_Half e_shnum
Definition:
elf.h:50
Elf32_Ehdr::e_phnum
Elf32_Half e_phnum
Definition:
elf.h:48
Elf32_Ehdr::e_shstrndx
Elf32_Half e_shstrndx
Definition:
elf.h:51
Elf32_Ehdr::e_type
Elf32_Half e_type
Definition:
elf.h:39
Elf32_Ehdr::e_shentsize
Elf32_Half e_shentsize
Definition:
elf.h:49
Elf32_Ehdr::e_ehsize
Elf32_Half e_ehsize
Definition:
elf.h:46
Elf32_Ehdr::e_phentsize
Elf32_Half e_phentsize
Definition:
elf.h:47
Elf32_Ehdr::e_shoff
Elf32_Off e_shoff
Definition:
elf.h:44
Elf32_Ehdr::e_phoff
Elf32_Off e_phoff
Definition:
elf.h:43
Elf32_Ehdr::e_version
Elf32_Word e_version
Definition:
elf.h:41
Elf32_Ehdr::e_flags
Elf32_Word e_flags
Definition:
elf.h:45
Elf32_Shdr
Definition:
elf.h:54
Elf32_Shdr::sh_addr
Elf32_Addr sh_addr
Definition:
elf.h:58
Elf32_Shdr::sh_size
Elf32_Word sh_size
Definition:
elf.h:60
Elf32_Shdr::sh_flags
Elf32_Word sh_flags
Definition:
elf.h:57
Elf32_Shdr::sh_type
Elf32_Word sh_type
Definition:
elf.h:56
Elf32_Shdr::sh_info
Elf32_Word sh_info
Definition:
elf.h:62
Elf32_Shdr::sh_offset
Elf32_Off sh_offset
Definition:
elf.h:59
Elf32_Shdr::sh_addralign
Elf32_Word sh_addralign
Definition:
elf.h:63
Elf32_Shdr::sh_entsize
Elf32_Word sh_entsize
Definition:
elf.h:64
Elf32_Shdr::sh_link
Elf32_Word sh_link
Definition:
elf.h:61
Elf32_Shdr::sh_name
Elf32_Word sh_name
Definition:
elf.h:55
Elf64_Shdr
Definition:
elf.h:67
Elf64_Shdr::sh_name
Elf64_Word sh_name
Definition:
elf.h:68
Elf64_Shdr::sh_link
Elf64_Word sh_link
Definition:
elf.h:74
Elf64_Shdr::sh_offset
Elf64_Off sh_offset
Definition:
elf.h:72
Elf64_Shdr::sh_flags
Elf64_Xword sh_flags
Definition:
elf.h:70
Elf64_Shdr::sh_addr
Elf64_Addr sh_addr
Definition:
elf.h:71
Elf64_Shdr::sh_size
Elf64_Xword sh_size
Definition:
elf.h:73
Elf64_Shdr::sh_addralign
Elf64_Xword sh_addralign
Definition:
elf.h:76
Elf64_Shdr::sh_type
Elf64_Word sh_type
Definition:
elf.h:69
Elf64_Shdr::sh_info
Elf64_Word sh_info
Definition:
elf.h:75
Elf64_Shdr::sh_entsize
Elf64_Xword sh_entsize
Definition:
elf.h:77
types.h
Common declarations for all tests.
Generated by
1.9.4