source: trunk/hal/x86_64/kernel.ld @ 240

Last change on this file since 240 was 57, checked in by max@…, 7 years ago

move the ldscript into x86_64/

File size: 853 bytes
Line 
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
14START_PHYS_ADDR = start_x86_64 - __KERNEL_BASE_VIRT ;
15
16ENTRY(start_x86_64)
17
18SECTIONS
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.