X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=boot.ld;fp=boot.ld;h=99bc7019b8192197154b14310796aeea2cc9a975;hb=be7535b3af9d7ecc5581a7b3d325f5caec87b24f;hp=b607e11b425654a88d6bffc3f94270f05229f3a7;hpb=06692d6c927aae4e6f06efd1e401d005839c1e5f;p=eightysix diff --git a/boot.ld b/boot.ld index b607e11..99bc701 100644 --- a/boot.ld +++ b/boot.ld @@ -6,10 +6,13 @@ SECTIONS { .bootsect : { * (.bootsect); } + _bootsect_end = .; - . = 0x7e00; + /* load high out of the way, to allow stage2 to load the kernel low */ + . = 0x80000; _stage2_start = .; - .text : { + _stage2_start_seg = _stage2_start >> 4; + .text : AT(_bootsect_end) { * (.startup); * (.text*); } @@ -19,6 +22,7 @@ SECTIONS { } .bss ALIGN(4) (NOLOAD): { _bss_start = .; + _bss_start_off = _bss_start - _stage2_start; * (.bss*); * (COMMON); . = ALIGN(4); @@ -26,4 +30,5 @@ SECTIONS { _bss_size = SIZEOF(.bss); . = ALIGN(4); _stage2_end = .; + _stage2_size = _stage2_end - _stage2_start; };