Just a little cleanup
[tpg/acess2.git] / KernelLand / Kernel / arch / x86_64 / link.ld
1 /*
2  * Acess2 x86_64 Kernel
3  * Linker Script
4  */
5
6 /* _kernel_base = 0xFFFF800000000000; */
7 /* -2 GiB */
8 _kernel_base = 0xFFFFFFFF80000000;
9
10 /*
11 OUTPUT_FORMAT(elf32-i386)
12 OUTPUT_ARCH(i386:x86-64)
13 */
14 OUTPUT_FORMAT(elf64-x86-64)
15 ENTRY(start)
16
17 SECTIONS {
18         . = 0x100000;
19         gKernelBase = .;
20         . += SIZEOF_HEADERS;
21         __load_addr = .;
22         .multiboot : AT(ADDR(.multiboot)) {
23                 *(.multiboot)
24         }
25         
26         . += _kernel_base;
27         
28         .text ALIGN(0x1000): AT(ADDR(.text) - _kernel_base) {
29                 *(.text)
30         }
31         
32         .usertext ALIGN(0x1000): AT(ADDR(.usertext) - _kernel_base) {
33                 _UsertextBase = .;
34                 *(.usertext)
35                 _UsertextEnd = .;
36         }
37         
38         .rodata ALIGN(0x1000): AT(ADDR(.rodata) - _kernel_base) {
39                 *(.initpd)
40                 *(.rodata .rodata.*)
41                 *(.rdata)
42                 
43                 . = ALIGN(0x10);
44                 gKernelModules = .;
45                 *(KMODULES)
46                 gKernelModulesEnd = .;
47                 . = ALIGN(0x10);
48                 gKernelSymbols = .;
49                 *(KEXPORT)
50                 gKernelSymbolsEnd = .;
51         }
52         
53         .data ALIGN (0x1000) : AT(ADDR(.data) - _kernel_base) {
54                 *(.padata)
55                 *(.data)
56         }
57
58         __bss_start = .;
59         .bss : AT(ADDR(.bss) - _kernel_base) {
60                 *(COMMON)
61                 *(.bss)
62         }
63         gKernelEnd = (. + 0xFFF)&0xFFFFFFFFFFFFF000;
64 }

UCC git Repository :: git.ucc.asn.au