-
Notifications
You must be signed in to change notification settings - Fork 1
/
ros.ld
31 lines (26 loc) · 908 Bytes
/
ros.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
SECTIONS {
.boot 0x7c00 : AT(0x0) {
*(.boot)
}
.kernel 0xf0100000 : AT(0x200) {
_KERNEL_VIRT_START = .;
KERNEL_PHYS_START = _KERNEL_VIRT_START - KERNEL_RELOC_BASE;
*(.text .text.* .rodata .rodata.* .data .data.*)
_KERNEL_VIRT_END = .;
KERNEL_PHYS_END = _KERNEL_VIRT_END - KERNEL_RELOC_BASE;
KERNEL_SIZE_SECTORS = (_KERNEL_VIRT_END-_KERNEL_VIRT_START + 0x1FF) >> 9;
/*
* hack to work around https://github.com/rust-lang/compiler-builtins/issues/333
* when building on macOS we generate Mach-O files but the target OS is not Apple,
* so the fix doesn't apply
*/
___rust_probestack = __rust_probestack;
}
.bss : {
KERNEL_BSS_START = .;
*(.bss .bss.*)
KERNEL_BSS_END = .;
}
_PHYSALLOC_START = . - KERNEL_RELOC_BASE;
/DISCARD/ : { *(.eh_*) }
}