mirror of
https://github.com/taigrr/gopher-os
synced 2025-01-18 04:43:13 -08:00
44 lines
766 B
Plaintext
44 lines
766 B
Plaintext
VMA = PAGE_OFFSET + LOAD_ADDRESS;
|
|
|
|
ENTRY(_rt0_32_entry)
|
|
|
|
SECTIONS {
|
|
/* Set the kernel VMA at PAGE_OFFSET + 1M
|
|
* but load it at physical address 1M */
|
|
. = VMA;
|
|
|
|
_kernel_start = .;
|
|
|
|
.text BLOCK(4K) : AT(ADDR(.text) - PAGE_OFFSET)
|
|
{
|
|
/* The multiboot header must be present in the first 4K of the kernel
|
|
* image so that the bootloader can find it */
|
|
*(.multiboot_header)
|
|
|
|
*(.rt0)
|
|
|
|
*(.text)
|
|
}
|
|
|
|
/* Read-only data. */
|
|
.rodata ALIGN(4K) : AT(ADDR(.rodata) - PAGE_OFFSET)
|
|
{
|
|
*(.rodata)
|
|
}
|
|
|
|
/* Read-write data (initialized) */
|
|
.data ALIGN(4K) : AT(ADDR(.data) - PAGE_OFFSET)
|
|
{
|
|
*(.data)
|
|
}
|
|
|
|
/* Read-write data (zeroed) */
|
|
.bss ALIGN(4K) : AT(ADDR(.bss) - PAGE_OFFSET)
|
|
{
|
|
*(COMMON)
|
|
*(.bss)
|
|
}
|
|
|
|
_kernel_end = ALIGN(4K);
|
|
}
|