source: trunk/kernel/kernel_x86.ld @ 48

Last change on this file since 48 was 47, checked in by max@…, 5 years ago

Use mcmodel=large, in order to have a kernel image that is located at the
beginning of each cluster in virtual memory, as discussed with Alain. The
performance cost will be taken care of later.

Now, the active kernel is located at 0xfffff00000000000, and the base of
the clusters is 0xffff800000000000.

File size: 853 bytes
RevLine 
[26]1/*******************************************************************************
[27]2 * This is the linker script for the ALMOS-MKH x86_64 kernel.
[26]3 * It describes the memory layout for the "kernel.elf" binary file.
4 ******************************************************************************/
5
6__PAGE_SIZE = 0x1000 ;
7
[47]8__KERNEL_BASE_VIRT = 0xfffff00000000000 ;
[26]9__KERNEL_BASE_PHYS = 0x0000000000000000 ;
10
[47]11__KERNEL_TEXT_VIRT = 0xfffff00000200000 ;
[26]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.