initial commit
[3sys] / sys1 / kern / kern1.ld
1 OUTPUT_ARCH(i386)
2
3 SECTIONS {
4         /* kernel will be loaded at 1MB by the boot loader */
5         . = 1M;
6
7         /* .startup needs to be first for the entry point to be at 1MB */
8         .startup : { * (.startup); }
9         /* the rest of the image sections */
10         .text : { * (.text); }
11         .rodata : { * (.rodata); }
12         .data : { * (.data); }
13
14         /* create markers for the start/end of the .bss section so that startup
15          * can initialize it to zero before transfering control to the C code.
16          */
17         .bss ALIGN(4): {
18                 _bss_start = .;
19                 * (.bss);
20                 . = ALIGN(4);
21                 _bss_end = .;
22         }
23         _bss_size = SIZEOF(.bss);
24
25         /* end of kernel marker. the allocator will mark all memory up to this
26          * point as used.
27          */
28         _kern_end = .;
29 };