SEARCH_DIR(objects) INPUT( bootloader.o libc.o serial.o video.o printf.o page.o acpi.o kernel.o ) /*while we do need to worry about the stack converging on our kernel, this is only temporary, and it will be more noticable then if it were to hit bios (we want to find bugs, not ignore them!)*/ _kernel_stack_loc = 0x200000 - 16; _kernel_loc = 0x100000; _meminfo_loc = 0x7000; _vbe_infoblock = 0x500; /* this does not account for segmentation to get over 0xffff*/ SECTIONS { . = 0x0; bootloader 0x7c00 : { bootloader.o(.text) } kernel _kernel_loc : AT (ADDR(bootloader) + SIZEOF(bootloader)) /*ALIGN(4096)*/ { EXCLUDE_FILE (*bootloader.o) *(.text .data .bss .rodata .comment .eh_frame) } } _kernel_size = (SIZEOF(kernel) / 512) + (SIZEOF(bootloader) / 512) + 2; _bootloader_stage1_size = (SIZEOF(bootloader) / 512) - 1;