X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=bootcensus;a=blobdiff_plain;f=pcboot.ld;h=e2c0308546e952dde858fbc1d2e0619a7c8a3db1;hp=28fb7e63753b3f4f4d6299d38fd0a0468c8fff55;hb=3cb6f9dad7e37db865bd3cbccf0b5d6471fdd73f;hpb=098b0dd7bf6600ed6b904cd531a55a6415996900 diff --git a/pcboot.ld b/pcboot.ld index 28fb7e6..e2c0308 100644 --- a/pcboot.ld +++ b/pcboot.ld @@ -7,13 +7,18 @@ SECTIONS { .boot : { * (.boot); } /* second stage boot loader */ - .boot2 : { * (.boot2); } + .boot2 : { + * (.boot2); + /* 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 +33,6 @@ SECTIONS { } _bss_size = SIZEOF(.bss); + _main_size = . - _main_start; _mem_start = .; }