2022-01-09 03:06:03 +00:00
|
|
|
OUTPUT_ARCH("i386")
|
|
|
|
ENTRY(_start)
|
|
|
|
|
2022-01-13 07:11:20 +00:00
|
|
|
_kernel_offset = 0xC0000000; /* 3 GiB */
|
2022-01-09 03:06:03 +00:00
|
|
|
|
|
|
|
_kernel_phys_base = 4M;
|
|
|
|
_kernel_virt_base = (_kernel_phys_base + _kernel_offset);
|
|
|
|
|
|
|
|
_kernel_stack_size = _kernel_stack_end - _kernel_stack_start;
|
|
|
|
|
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
. = _kernel_phys_base;
|
|
|
|
|
|
|
|
.text BLOCK(4K) : ALIGN(4K)
|
|
|
|
{
|
2022-01-15 18:06:03 +00:00
|
|
|
*(.multiboot2);
|
|
|
|
*(.text);
|
2022-01-09 03:06:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.rodata BLOCK(4K) : ALIGN(4K)
|
|
|
|
{
|
2022-01-15 18:06:03 +00:00
|
|
|
*(.rodata);
|
2022-01-09 03:06:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.data BLOCK(4K) : ALIGN(4K)
|
|
|
|
{
|
2022-01-15 18:06:03 +00:00
|
|
|
*(.data);
|
2022-01-09 03:06:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.bss BLOCK(4K) : ALIGN(4K)
|
|
|
|
{
|
2022-01-15 18:06:03 +00:00
|
|
|
*(COMMON);
|
|
|
|
*(.bss);
|
2022-01-09 03:06:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
_kernel_size = . - _kernel_phys_base;
|
|
|
|
}
|