MyOS Libc
elf.h
1
#ifndef DOXYGEN_SHOULD_SKIP_THIS
2
#ifndef ELF_H
3
#define ELF_H
4
#define ELF_MAGIC 0x464c457f
5
6
#include <stdint.h>
7
8
9
typedef
struct
{
10
uint32_t magic;
11
char
type;
12
char
endian;
13
char
version;
14
char
abi;
15
char
padding[8];
16
uint16_t type2;
17
uint16_t iset;
18
uint32_t version2;
19
uint32_t entry;
20
uint32_t prog_hdr;
21
uint32_t section_hdr;
22
uint32_t flags;
23
uint16_t header_sz;
24
uint16_t pheader_ent_sz;
25
uint16_t pheader_ent_nm;
26
uint16_t sheader_ent_sz;
27
uint16_t sheader_ent_nm;
28
uint16_t sheader_nm_idx;
29
} __attribute__((packed)) elf_header;
30
31
typedef
struct
{
32
uint32_t type;
33
uint32_t offset;
34
uint32_t vaddr;
35
uint32_t unused;
36
uint32_t filesz;
37
uint32_t memsz;
38
uint32_t flags;
39
uint32_t alignment;
40
} __attribute__((packed)) elf_pheader;
41
42
43
#endif
44
#endif
libc
elf.h
Generated by
1.9.1