debugging loading full program in unreal mode
[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 : { * (.boot2); }
11         _boot2_size = SIZEOF(.boot2);
12
13         /* main program will be loaded at 1MB by the second stage
14          * boot loader
15          */
16         . = 1M;
17         _main_start = .;
18
19         .startup : { * (.startup); }
20         .text : { * (.text); }
21         .rodata : { * (.rodata); }
22         .data : { * (.data); }
23
24         .bss ALIGN(4): {
25                 _bss_start = .;
26                 * (.bss);
27                 . = ALIGN(4);
28                 _bss_end = .;
29         }
30         _bss_size = SIZEOF(.bss);
31
32         _main_size = . - _main_start;
33         _mem_start = .;
34 }