-
Notifications
You must be signed in to change notification settings - Fork 0
/
link.ld
82 lines (64 loc) · 1.66 KB
/
link.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
/*======================================================================*/
/* TIMA LABORATORY */
/*======================================================================*/
/*----------------------------------------------------------------------*/
/* Setup */
/*----------------------------------------------------------------------*/
OUTPUT_ARCH( "riscv" )
ENTRY(_start)
/*----------------------------------------------------------------------*/
/* Sections */
/*----------------------------------------------------------------------*/
SECTIONS
{
/* text: test code section */
. = 0x80000000;
.text.init : { *(.text.init) }
. = ALIGN(0x1000);
.tohost : { *(.tohost) }
.text : { *(.text) }
/* data segment */
.data : { *(.data) }
.sdata : {
__global_pointer$ = . + 0x800;
*(.srodata.cst16) *(.srodata.cst8) *(.srodata.cst4) *(.srodata.cst2) *(.srodata*)
*(.sdata .sdata.* .gnu.linkonce.s.*)
}
/* bss segment */
.sbss : {
*(.sbss .sbss.* .gnu.linkonce.sb.*)
*(.scommon)
}
.bss : {
*(.bss)
}
/* thread-local data segment */
.tdata :
{
_tls_data = .;
_tdata_begin = . ;
*(.tdata)
_tdata_end = .;
}
.tbss :
{
*(.tbss)
_tbss_end = .;
}
.heap : {
. = ALIGN(4);
_heap = .;
_heap_start = .;
. += 0x1000;
_heap_end = .;
}
.stack : {
_stack_end = .;
. += 0x1000;
. = ALIGN(4);
_stack = .;
__stack = _stack;
}
/* End of uninitalized data segement */
_end = .;
}