Last change
on this file since 218 was
57,
checked in by max@…, 7 years ago
|
move the ldscript into x86_64/
|
File size:
853 bytes
|
Rev | Line | |
---|
[57] | 1 | /******************************************************************************* |
---|
| 2 | * This is the linker script for the ALMOS-MKH x86_64 kernel. |
---|
| 3 | * It describes the memory layout for the "kernel.elf" binary file. |
---|
| 4 | ******************************************************************************/ |
---|
| 5 | |
---|
| 6 | __PAGE_SIZE = 0x1000 ; |
---|
| 7 | |
---|
| 8 | __KERNEL_BASE_VIRT = 0xfffff00000000000 ; |
---|
| 9 | __KERNEL_BASE_PHYS = 0x0000000000000000 ; |
---|
| 10 | |
---|
| 11 | __KERNEL_TEXT_VIRT = 0xfffff00000200000 ; |
---|
| 12 | __KERNEL_TEXT_PHYS = 0x0000000000200000 ; |
---|
| 13 | |
---|
| 14 | START_PHYS_ADDR = start_x86_64 - __KERNEL_BASE_VIRT ; |
---|
| 15 | |
---|
| 16 | ENTRY(start_x86_64) |
---|
| 17 | |
---|
| 18 | SECTIONS |
---|
| 19 | { |
---|
| 20 | . = __KERNEL_TEXT_VIRT ; |
---|
| 21 | |
---|
| 22 | seg_kcode : AT(__KERNEL_TEXT_PHYS) |
---|
| 23 | { |
---|
| 24 | *(.boot) |
---|
| 25 | *(.text) |
---|
| 26 | *(.rodata*) |
---|
| 27 | } |
---|
| 28 | |
---|
| 29 | . = ALIGN(__PAGE_SIZE) ; |
---|
| 30 | |
---|
| 31 | __kernel_data_start = . ; |
---|
| 32 | seg_kdata : |
---|
| 33 | { |
---|
| 34 | *(.kinfo) |
---|
| 35 | *(.kidle) |
---|
| 36 | *(.kdata*) |
---|
| 37 | *(.data*) |
---|
| 38 | . = ALIGN(__PAGE_SIZE) ; |
---|
| 39 | } |
---|
| 40 | |
---|
| 41 | __kernel_end = . ; |
---|
| 42 | } |
---|
| 43 | |
---|
Note: See
TracBrowser
for help on using the repository browser.