2024-10-14 09:57:11 -04:00
|
|
|
ENTRY (_start)
|
2024-09-06 18:36:03 -04:00
|
|
|
|
|
|
|
SECTIONS
|
|
|
|
{
|
2024-10-14 09:57:11 -04:00
|
|
|
. = 0x00100000;
|
|
|
|
/* The kernel will live at 3GB + 1MB in the virtual address space, */
|
|
|
|
/* which will be mapped to 1MB in the physical address space. */
|
|
|
|
/* Note that we page-align the sections. */
|
2024-09-06 18:36:03 -04:00
|
|
|
|
2024-10-14 09:57:11 -04:00
|
|
|
_kernel_start = .;
|
|
|
|
.multiboot.data : {
|
|
|
|
*(.multiboot.data)
|
|
|
|
}
|
|
|
|
|
|
|
|
.multiboot.text : {
|
|
|
|
*(.multiboot.text)
|
|
|
|
}
|
|
|
|
|
|
|
|
. += 0xC0000000;
|
|
|
|
/* Add a symbol that indicates the start address of the kernel. */
|
|
|
|
.text ALIGN (4K) : AT (ADDR (.text) - 0xC0000000)
|
2024-09-06 18:36:03 -04:00
|
|
|
{
|
|
|
|
*(.text)
|
|
|
|
}
|
2024-10-14 09:57:11 -04:00
|
|
|
.rodata ALIGN (4K) : AT (ADDR (.rodata) - 0xC0000000)
|
2024-09-06 18:36:03 -04:00
|
|
|
{
|
|
|
|
*(.rodata)
|
|
|
|
}
|
2024-10-14 09:57:11 -04:00
|
|
|
.data ALIGN (4K) : AT (ADDR (.data) - 0xC0000000)
|
2024-09-06 18:36:03 -04:00
|
|
|
{
|
|
|
|
*(.data)
|
|
|
|
}
|
2024-10-14 09:57:11 -04:00
|
|
|
.bss ALIGN (4K) : AT (ADDR (.bss) - 0xC0000000)
|
2024-09-06 18:36:03 -04:00
|
|
|
{
|
|
|
|
*(COMMON)
|
|
|
|
*(.bss)
|
2024-10-14 09:57:11 -04:00
|
|
|
*(.bootstrap_stack)
|
2024-09-06 18:36:03 -04:00
|
|
|
}
|
2024-10-14 09:57:11 -04:00
|
|
|
/* Add a symbol that indicates the end address of the kernel. */
|
|
|
|
_kernel_end = .;
|
|
|
|
}
|