forked from bao-project/bao-hypervisor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
linker.ld
103 lines (79 loc) · 1.9 KB
/
linker.ld
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/**
* Bao, a Lightweight Static Partitioning Hypervisor
*
* Copyright (c) Bao Project (www.bao-project.org), 2019-
*
* Authors:
* Jose Martins <[email protected]>
*
* Bao is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License version 2 as published by the Free
* Software Foundation, with a special exception exempting guest code from such
* license. See the COPYING file in the top-level directory for details.
*
*/
#include <bao.h>
ENTRY(_image_start)
SECTIONS
{
. = BAO_VAS_BASE;
_image_start = ABSOLUTE(.);
.boot : {
*(.boot)
ASSERT((SIZEOF(.boot) <= PAGE_SIZE), "boot section must fit in one page");
}
.text : {
*(.text)
}
.rodata : {
*(.rdata .rodata .rodata.*)
_dev_init_table_start = .;
*(.dev_init_table)
_dev_init_table_end = .;
}
.data : {
*(.data .data.*)
*(.sdata .sdata.* .sdata2.*)
}
.ipi_cpumsg_handlers : {
_ipi_cpumsg_handlers_start = .;
*(.ipi_cpumsg_handlers)
}
.ipi_cpumsg_handlers_id : {
_ipi_cpumsg_handlers_id_start = .;
*(.ipi_cpumsg_handlers_id)
}
_ipi_cpumsg_handlers_size = SIZEOF(.ipi_cpumsg_handlers);
/* Only no load regions below */
.bss (NOLOAD) : {
_bss_start = .;
*(.bss)
*(COMMON)
_bss_end = .;
}
.glb_page_tables (NOLOAD) : ALIGN(PAGE_SIZE) {
_page_tables_start = .;
*(.glb_page_tables)
_page_tables_end = .;
}
. = ALIGN(PAGE_SIZE);
_image_end = ABSOLUTE(.);
_dmem_phys_beg = ABSOLUTE(.);
.devices (NOLOAD) : ALIGN(PAGE_SIZE) {
*(.devices)
}
. = ALIGN(PAGE_SIZE);
_dmem_beg = ABSOLUTE(.);
_cpu_if_base = ABSOLUTE(.);
/* Global dynamic memory virtual address space here */
. = BAO_CPU_BASE;
_cpu_private_beg = ABSOLUTE(.);
.cpu_private (NOLOAD) : ALIGN(PAGE_SIZE) {
*(.cpu_private)
}
. = BAO_VM_BASE;
_cpu_private_end = ABSOLUTE(.);
_vm_beg = ABSOLUTE(.);
. = BAO_VAS_TOP;
_vm_end = ABSOLUTE(.);
}