os/arch/i686/linker.ld
2024-11-27 21:57:18 +01:00

49 lines
829 B
Plaintext

/* The bootloader will look at this image and start execution at the symbol
designated as the entry point. */
ENTRY(_start)
/* Tell where the various sections of the object files will be put in the final
kernel image. */
SECTIONS
{
. = 1M;
_kernel_start = .;
.multiboot.data :
{
*(.multiboot.data)
}
.multiboot.text :
{
*(.multiboot.text)
}
. += 0xC0000000;
.text BLOCK (4K) : AT (ADDR (.text) - 0xC0000000)
{
*(.text)
}
/* Read-only data. */
.rodata BLOCK(4K) : AT (ADDR (.rodata) - 0xC0000000)
{
*(.rodata)
}
/* Read-write data (initialized) */
.data BLOCK(4K) : AT (ADDR (.data) - 0xC0000000)
{
*(.data)
}
/* Read-write data (uninitialized) and stack */
.bss BLOCK(4K) : AT (ADDR (.bss) - 0xC0000000)
{
*(COMMON)
*(.bss)
}
_kernel_end = .;
}