ladybird/Kernel/linker.ld
Andreas Kling e362b56b4f Kernel: Move kernel above the 3GB virtual address mark
The kernel and its static data structures are no longer identity-mapped
in the bottom 8MB of the address space, but instead move above 3GB.

The first 8MB above 3GB are pseudo-identity-mapped to the bottom 8MB of
the physical address space. But things don't have to stay this way!

Thanks to Jesse who made an earlier attempt at this, it was really easy
to get device drivers working once the page tables were in place! :^)

Fixes #734.
2020-01-17 22:34:26 +01:00

46 lines
822 B
Plaintext

ENTRY(start)
SECTIONS
{
. = 0xc0100000;
start_of_kernel_image = .;
.text ALIGN(4K) : AT (ADDR(.text) - 0xc0000000)
{
Arch/i386/Boot/boot.ao
*(.multiboot)
start_of_kernel_text = .;
*(.text)
*(.text.startup)
end_of_kernel_text = .;
}
.rodata ALIGN(4K) : AT (ADDR(.rodata) - 0xc0000000)
{
start_ctors = .;
*(.ctors)
end_ctors = .;
*(.rodata)
}
.data ALIGN(4K) : AT (ADDR(.data) - 0xc0000000)
{
start_of_kernel_data = .;
*(.data)
end_of_kernel_data = .;
}
.bss ALIGN(4K) : AT (ADDR(.bss) - 0xc0000000)
{
start_of_kernel_bss = .;
*(page_tables)
*(COMMON)
*(.bss)
end_of_kernel_bss = .;
}
end_of_kernel_image = .;
}