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