foo
[eightysix] / kern / kern.ld
1 OUTPUT_FORMAT(binary)
2 ENTRY(_start)
3
4 SECTIONS {
5         /* we'll relocate the boot sector to this address immediately, and
6          * continue loading the kernel from the end of it
7          */
8         . = 0x600;
9         _bootsect_start = .;
10         .bootsect : {
11                 * (.bootsect);
12         }
13
14         _kern_start = .;
15         _kern_start_seg = _kern_start >> 4;
16         .text : {
17                 * (.startup);
18                 * (.text*);
19         }
20         .data : {
21                 * (.rodata*);
22                 * (.data*);
23         }
24         .bss ALIGN(4): {
25                 _bss_start = .;
26                 _bss_start_off = _bss_start - _kern_start;
27                 * (.bss*);
28                 * (COMMON);
29                 . = ALIGN(4);
30         }
31         _bss_size = SIZEOF(.bss);
32         . = ALIGN(4);
33         _kern_end = .;
34         _kern_size = _kern_end - _kern_start;
35 };