1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2024-10-30 11:54:01 -04:00
libkernaux/examples/bootloader-multiboot2-limine/linker.ld

39 lines
597 B
Text
Raw Normal View History

2022-01-08 22:06:03 -05:00
OUTPUT_ARCH("i386")
ENTRY(_start)
2022-01-13 02:11:20 -05:00
_kernel_offset = 0xC0000000; /* 3 GiB */
2022-01-08 22:06:03 -05: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-14 01:05:13 -05:00
*(.multiboot2)
2022-01-08 22:06:03 -05:00
*(.text)
}
.rodata BLOCK(4K) : ALIGN(4K)
{
*(.rodata)
}
.data BLOCK(4K) : ALIGN(4K)
{
*(.data)
}
.bss BLOCK(4K) : ALIGN(4K)
{
*(COMMON)
*(.bss)
}
_kernel_size = . - _kernel_phys_base;
}