2fe17641d33617c967f12f21bfd2c04838e41602
[tpg/acess2.git] / Kernel / arch / x86 / link.ld
1 /*
2  * AcessMicro Kernel
3  * Linker Script
4  */
5
6 //lowStart = start - 0xC0000000;
7 ENTRY(start)
8 OUTPUT_FORMAT(elf32-i386)
9
10 SECTIONS {
11         . = 0x100000;
12         __load_addr = .;
13         .multiboot : AT(ADDR(.multiboot)) {
14                 *(.multiboot)
15         }
16         
17         . += 0xC0000000;
18         
19         .text ALIGN(0x1000): AT(ADDR(.text) - 0xC0000000) {
20                 *(.text)
21         }
22         
23         .usertext ALIGN(0x1000): AT(ADDR(.usertext) - 0xC0000000) {
24                 _UsertextBase = .;
25                 *(.usertext)
26         }
27         
28         .rodata ALIGN(0x1000): AT(ADDR(.rodata) - 0xC0000000) {
29                 *(.initpd)
30                 *(.rodata)
31                 *(.rdata)
32                 gKernelModules = .;
33                 *(KMODULES)
34                 gKernelModulesEnd = .;
35                 . = ALIGN(4);
36                 gKernelSymbols = .;
37                 *(KEXPORT)
38                 gKernelSymbolsEnd = .;
39
40
41         }
42         /*
43         .debug_abbrev : { *(.debug_abbrev) }
44         .debug_info : { *(.debug_info) }
45         .debug_line : { *(.debug_line) }
46         .debug_loc : { *(.debug_loc) }
47         .debug_pubnames : { *(.debug_pubnames) }
48         .debug_aranges : { *(.debug_aranges) }
49         .debug_ranges : { *(.debug_ranges) }
50         .debug_str : { *(.debug_str) }
51         .debug_frame : { *(.debug_frame) }
52         */
53         
54         .padata ALIGN (0x1000) : AT(ADDR(.padata) - 0xC0000000) {
55                 *(.padata)
56         }
57         
58         .data ALIGN (0x1000) : AT(ADDR(.data) - 0xC0000000) {
59                 *(.data)
60         }
61
62         __bss_start = .;
63         .bss : AT(ADDR(.bss) - 0xC0000000) {
64                 _sbss = .;
65                 *(COMMON)
66                 *(.bss)
67                 _ebss = .;
68         }
69         gKernelEnd = (. + 0xFFF)&0xFFFFF000;
70 }

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