3922811527e8fde1e5aa03b0b5c1d591604cdd90
[eightysix] / kern / kern.ld
1 OUTPUT_FORMAT(binary)
2 ENTRY(_start)
3
4 SECTIONS {
5         . = 0x7c00;
6         .bootsect : {
7                 * (.bootsect);
8         }
9         _bootsect_end = .;
10
11         /* load high out of the way, to leave the rest of RAM for userland
12          * reserving the top 32kb for the kernel for now
13          */
14         . = 0x98000;
15         _kern_start = .;
16         _kern_start_seg = _kern_start >> 4;
17         .text : AT(_bootsect_end) {
18                 * (.startup);
19                 * (.text*);
20         }
21         .data : {
22                 * (.rodata*);
23                 * (.data*);
24         }
25         .bss ALIGN(4) (NOLOAD): {
26                 _bss_start = .;
27                 _bss_start_off = _bss_start - _kern_start;
28                 * (.bss*);
29                 * (COMMON);
30                 . = ALIGN(4);
31         }
32         _bss_size = SIZEOF(.bss);
33         . = ALIGN(4);
34         _kern_end = .;
35         _kern_size = _kern_end - _kern_start;
36 };