Asuro/linker.script
Kieron Morris 208bda92c8 Kernel Size Awareness
Modified the linker script + Added an init function to System.pas to be called at system boot, this allows tracking of the Kernel start & end addresses, and thus, allows us to calculate the kernel size.
2022-02-06 13:29:29 +00:00

38 lines
665 B
Plaintext

ENTRY(loader)
SECTIONS
{
. = 0xC0100000;
kernel_start = .;
.text : AT(ADDR(.text) - 0xC0000000)
{
text = .; _text = .; __text = .;
*(.text)
*(.rodata*)
. = ALIGN(4096);
}
.data : AT(ADDR(.data) - 0xC0000000)
{
data = .; _data = .; __data = .;
*(.data)
kimage_text = .;
LONG(text);
kimage_data = .;
LONG(data);
kimage_bss = .;
LONG(bss);
kimage_end = .;
LONG(end);
. = ALIGN(4096);
}
.bss : AT(ADDR(.bss) - 0xC0000000)
{
bss = .; _bss = .; __bss = .; _sbss = .;
*(COMMON)
*(.bss)
_ebbbss = .;
. = ALIGN(4096);
}
end = .; _end = .; __end = .;
kernel_end = .;
}