blob: 85c4fe74502f6b6d9efaa7bc44f0d805df467aae (
plain)
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
|
enum {
CLASS_NONE,
CLASS_32,
CLASS_64
};
struct elf {
u8 ei_magic[4] | matches('\x7fELF') str;
u8 ei_class hex;
u8 ei_data hex;
u8 ei_version;
u8 ei_osabi;
u8 ei_abi_version;
u8 padding[7] nul;
u16 e_type hex;
u16 e_machine hex;
u32 e_version;
select (ei_class) {
CLASS_32) struct {
u32 e_entry hex;
u32 e_phoff;
u32 e_shoff;
} elf32;
CLASS_64) struct {
u64 e_entry hex;
u64 e_phoff;
u64 e_shoff;
} elf64;
} arch;
u32 e_flags hex;
u16 e_ehsz;
u16 e_phentsize;
u16 e_phnum;
u16 e_shentsize;
u16 e_shnum;
u16 e_shstrndx;
};
|