forked from josecm/riscv-hyp-tests
-
Notifications
You must be signed in to change notification settings - Fork 1
/
linker.ld
56 lines (42 loc) · 750 Bytes
/
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
#include <platform.h>
OUTPUT_FORMAT(elf64-littleriscv)
ENTRY(_boot)
STACK_SIZE = 1M;
MEMORY {
RAM (rwx) : ORIGIN = MEM_BASE, LENGTH = MEM_SIZE
}
SECTIONS {
.boot : {
*(.boot)
}
.text : {
*(.text)
}
.rodata : {
*(.rodata)
}
.test_table : {
_test_table = .;
*(.test_table)
_test_table_end = .;
}
_test_table_size = (_test_table_end - _test_table) / 8;
.data : {
*(.data)
}
// HTIF memory needs to be located on its own page
.tohost ALIGN(0x1000) : {
*(.tohost)
}
.bss ALIGN(0x1000) (NOLOAD) : {
__bss_start = .;
*(.bss)
*(.sbss)
*(COMMON)
__bss_end = .;
}
. = MEM_BASE + 0x1ff000;
. = ALIGN(16) + STACK_SIZE;
__stack_top = .;
_end = .;
}