-
Notifications
You must be signed in to change notification settings - Fork 56
/
aarch64-unknown-none.ld
55 lines (45 loc) · 1.4 KB
/
aarch64-unknown-none.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
ENTRY(ram64_start)
/* Cloud Hypervisor Memory layout:
DRAM: [0x4000_0000-0xfc00_0000]
FDT: [0x4000_0000-0x401f_ffff)
ACPI: [0x4020_0000-0x403f_ffff)
payload:[0x4040_0000-0x405f_ffff)
RHF: [0x40600000-]
Assuming 2MB is enough to load payload.
The stack start is at the end of the RHF region. */
ram_min = 0x40600000;
/* This value must be identical with arch::aarch64::layout::map::dram::KERNEL_START. */
PAYLOAD_START = 0x40400000;
efi_image_size = rhf_end - ram_min;
efi_image_offset = ram_min - PAYLOAD_START;
SECTIONS
{
/* Mapping the program headers and note into RAM makes the file smaller. */
. = ram_min;
/* These sections are mapped into RAM from the file. Omitting :ram from
later sections avoids emitting empty sections in the final binary. */
code_start = .;
.text.boot : { *(.text.boot) }
.text : { *(.text .text.*) }
. = ALIGN(64K);
code_end = .;
data_start = .;
.data : { *(.data .data.*) }
.rodata : { *(.rodata .rodata.*) }
/* The BSS section isn't mapped from file data. It is just zeroed in RAM. */
.bss : {
*(.bss .bss.*)
}
. = ALIGN(4K);
data_end = .;
stack_start = .;
.stack (NOLOAD) : ALIGN(4K) { . += 128K; }
stack_end = .;
/* Strip symbols from the output binary (comment out to get symbols) */
/DISCARD/ : {
*(.symtab)
*(.strtab)
}
. = ALIGN(4K);
rhf_end = .;
}