-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimage.ld
46 lines (38 loc) · 933 Bytes
/
image.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
SECTIONS {
/* Assign load address (per QEMU) */
. = 0x70010000;
/* Place text segment(s) */
.text : {
kernel/lolevel.o(.text)
*(.text .rodata)
}
/* Place data segment(s) */
.data : {
*(.data)
}
/* Place bss segment(s) */
.bss : {
*(.bss)
}
/* Setup kernel heap */
.heap : {
end = .;
_heap_start = .;
. = . + 0x1000;
_heap_end = .;
}
/* Align address (per AAPCS) */
. = ALIGN(8);
/* Allocate stack for irq mode */
. = . + 0x1000;
tos_irq = .;
/* Allocate stack for svc mode */
. = . + 0x1000;
tos_svc = .;
/* Allocate stack for usr mode */
/* We will split this into 4 KiB sections, 1 section will be given to each new process */
max_procs = 32;
proc_stack_size = 0x1000;
. = . + proc_stack_size * max_procs;
usr_stacks = .;
}