NOVA
Stripped down NOVA kernel for the OSY course
Loading...
Searching...
No Matches
include
elf.h
1
/*
2
* Executable and Linkable Format (ELF)
3
*
4
* Copyright (C) 2009-2011 Udo Steinberg <udo@hypervisor.org>
5
* Economic rights: Technische Universitaet Dresden (Germany)
6
*
7
* This file is part of the NOVA microhypervisor.
8
*
9
* NOVA is free software: you can redistribute it and/or modify it
10
* under the terms of the GNU General Public License version 2 as
11
* published by the Free Software Foundation.
12
*
13
* NOVA is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License version 2 for more details.
17
*/
18
19
#pragma once
20
21
#include "compiler.h"
22
23
class
Eh
24
{
25
public
:
26
uint32 ei_magic;
27
uint8 ei_class, ei_data, ei_version, ei_pad[9];
28
uint16 type, machine;
29
uint32 version;
30
mword entry, ph_offset, sh_offset;
31
uint32 flags;
32
uint16 eh_size, ph_size, ph_count, sh_size, sh_count, strtab;
33
};
34
35
class
Ph
36
{
37
public
:
38
enum
39
{
40
PT_NULL = 0,
41
PT_LOAD = 1,
42
PT_DYNAMIC = 2,
43
PT_INTERP = 3,
44
PT_NOTE = 4,
45
PT_SHLIB = 5,
46
PT_PHDR = 6,
47
};
48
49
enum
50
{
51
PF_X = 0x1,
52
PF_W = 0x2,
53
PF_R = 0x4,
54
};
55
56
uint32 type;
57
uint32 f_offs;
58
uint32 v_addr;
59
uint32 p_addr;
60
uint32 f_size;
61
uint32 m_size;
62
uint32 flags;
63
uint32 align;
64
};
Eh
Definition
elf.h:24
Ph
Definition
elf.h:36
Generated by
1.14.0