ENTRY(_start)
SECTIONS {
. = 0x500;
/* buffer for loading the kernel */
_kernel_buffer = .;
. += 512;
/* page tables */
. = ALIGN(0x1000);
__page_table_start = .;
_p4 = .;
. += 0x1000;
_p3 = .;
. += 0x1000;
_p2 = .;
. += 0x1000;
_p1 = .;
. += 0x1000;
__page_table_end = .;
__bootloader_start = .;
_memory_map = .;
. += 0x1000;
_stack_start = .;
. = 0x7c00;
_stack_end = .;
.bootloader :
{
/* first stage */
*(.boot)
/* second stage */
_second_stage_start_addr = .;
*(.second_stage)
*(.context_switch)
*(.text .text.*)
*(.rodata .rodata.*)
*(.data .data.*)
. = ALIGN(512);
_second_stage_end_addr = .;
}
_kernel_info_block_start = .;
_kib_kernel_size = .;
. += 512; /* kernel info block */
_kernel_info_block_end = .;
__bootloader_end = .;
_kernel_start_addr = .;
}