X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=bootcensus;a=blobdiff_plain;f=pcboot.ld;h=6a2390fa3b1a3659ff76f8bbb4d904e156358da0;hp=28fb7e63753b3f4f4d6299d38fd0a0468c8fff55;hb=7b6f6de2124e28ae7da5599a7cdaf2c171c4f15e;hpb=098b0dd7bf6600ed6b904cd531a55a6415996900 diff --git a/pcboot.ld b/pcboot.ld index 28fb7e6..6a2390f 100644 --- a/pcboot.ld +++ b/pcboot.ld @@ -7,13 +7,21 @@ SECTIONS { .boot : { * (.boot); } /* second stage boot loader */ - .boot2 : { * (.boot2); } + .boot2 : { + * (.boot2); + * (.lowtext); + /* .bootend must stay last */ + * (.bootend); + /* pad the boot loader to the next sector boundary */ + . = ALIGN(512); + } _boot2_size = SIZEOF(.boot2); /* main program will be loaded at 1MB by the second stage * boot loader */ . = 1M; + _main_start = .; .startup : { * (.startup); } .text : { * (.text); } @@ -28,5 +36,6 @@ SECTIONS { } _bss_size = SIZEOF(.bss); + _main_size = . - _main_start; _mem_start = .; }