OUTPUT_FORMAT(binary) ENTRY(_start) SECTIONS { /* we'll relocate the boot sector to this address immediately, and * continue loading the kernel from the end of it */ . = 0x600; _bootsect_start = .; .bootsect : { * (.bootsect); } _kern_start = .; _kern_start_seg = _kern_start >> 4; .text : { * (.startup); * (.text*); } .data : { * (.rodata*); * (.data*); } .bss ALIGN(4): { _bss_start = .; _bss_start_off = _bss_start - _kern_start; * (.bss*); * (COMMON); . = ALIGN(4); } _bss_size = SIZEOF(.bss); . = ALIGN(4); _kern_end = .; _kern_size = _kern_end - _kern_start; };