jankos/link.ld
2018-11-29 20:47:13 -08:00

30 lines
461 B
Plaintext

ENTRY(loader) /* entry label */
SECTIONS {
/* code will load at 1 MB because grub takes that space */
/* think of this like the initial offset for _the everthing_ */
. = 0x00100000;
/* align instruction block to 4kb */
.text ALIGN (0x1000) :
{
*(.text)
}
/* align rodata to 4KB off the previous as well */
.rodata ALIGN (0x1000) :
{
*(.rodata*)
}
.data ALIGN (0x1000) :
{
*(.data*)
}
.bss ALIGN (0x1000) :
{
*(COMMON)
*(.bss)
}
}