- moved the int86 code out of the 2nd stage boot loader code, and into a
[bootcensus] / pcboot.ld
1 OUTPUT_ARCH(i386)
2
3 SECTIONS {
4         /* BIOS loads the boot code at 0000:7c00 */
5         . = 0x7c00;
6
7         .boot : { * (.boot); }
8
9         /* second stage boot loader */
10         .boot2 : {
11                 * (.boot2);
12                 * (.lowtext);
13                 /* .bootend must stay last */
14                 * (.bootend);
15                 /* pad the boot loader to the next sector boundary */
16                 . = ALIGN(512);
17         }
18         _boot2_size = SIZEOF(.boot2);
19
20         /* main program will be loaded at 1MB by the second stage
21          * boot loader
22          */
23         . = 1M;
24         _main_start = .;
25
26         .startup : { * (.startup); }
27         .text : { * (.text); }
28         .rodata : { * (.rodata); }
29         .data : { * (.data); }
30
31         .bss ALIGN(4): {
32                 _bss_start = .;
33                 * (.bss);
34                 . = ALIGN(4);
35                 _bss_end = .;
36         }
37         _bss_size = SIZEOF(.bss);
38
39         _main_size = . - _main_start;
40         _mem_start = .;
41 }