X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=pcboot.ld;h=4879417921d99b8293e885592eaaf6db7bc34970;hb=eb934abaf0dcfa48589c6ac15f2a2ff235c5aea0;hp=f6291245002a03e2c67380a968e9f4f43a9abac7;hpb=e5b5905eb3134a409638a5a20462000ef159e1e6;p=bootcensus diff --git a/pcboot.ld b/pcboot.ld index f629124..4879417 100644 --- a/pcboot.ld +++ b/pcboot.ld @@ -1,10 +1,21 @@ OUTPUT_ARCH(i386) SECTIONS { - /* BIOS will load us at 0x7c000h */ - . = 0x7c000; + /* BIOS loads the boot code at 0000:7c00 */ + . = 0x7c00; .boot : { * (.boot); } + + /* second stage boot loader */ + .boot2 : { * (.boot2); } + _boot2_size = SIZEOF(.boot2); + + /* main program will be loaded at 1MB by the second stage + * boot loader + */ + . = 1M; + _main_start = .; + .startup : { * (.startup); } .text : { * (.text); } .rodata : { * (.rodata); } @@ -18,5 +29,6 @@ SECTIONS { } _bss_size = SIZEOF(.bss); + _main_size = . - _main_start; _mem_start = .; }