-
Notifications
You must be signed in to change notification settings - Fork 0
/
link.ld
63 lines (49 loc) · 1.31 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
__rpi_phys_dram_start_addr = 0;
__rpi_phys_binary_load_addr = 0x80000;
ENTRY(__rpi_phys_binary_load_addr)
PAGE_SIZE = 4k;
PHDRS
{
segment_boot_core_stack PT_LOAD FLAGS(6);
segment_code PT_LOAD FLAGS(5);
segment_data PT_LOAD FLAGS(6);
}
SECTIONS
{
. = __rpi_phys_dram_start_addr;
.boot_core_stack (NOLOAD) :
{
. += __rpi_phys_binary_load_addr;
__boot_core_stack_end_exclusive = .;
} :segment_boot_core_stack
.text :
{
KEEP(*(.text._start))
*(.text._start_arguments)
*(.text._start_rust)
*(.text*)
} :segment_code
.rodata : ALIGN(8) {
*(.rodata*);
} :segment_code
.got : ALIGN(8) { *(.got) } :segment_code
. = ALIGN(PAGE_SIZE);
__code_end = .;
.data : { *(.data*) } :segment_data
/* Place the TTBR0 page tables in memory */
. = ALIGN(PAGE_SIZE);
__ttbr0_el1_start = .;
. += 3 * PAGE_SIZE;
__boot_alloc_bitmap_start = .;
/* This page is used to store the bitmap of the boot allocator */
. += PAGE_SIZE;
/* Thereafter, we have the memory of the boot allocator */
__boot_alloc_start = .;
.bss (NOLOAD) : ALIGN(16)
{
__bss_start = .;
*(.bss*);
. = ALIGN(16);
__bss_end_exclusive = .;
} :segment_data
}