Memory management and kernel size
Posted: Thu Apr 17, 2014 8:45 am
hi,
I'm implementing the memory management of my SO but how can I get the size of the kernel? (I'm using the multiboot spec).
my link.ld script
thanks.
I'm implementing the memory management of my SO but how can I get the size of the kernel? (I'm using the multiboot spec).
my link.ld script
Code: Select all
ENTRY(_start)
SECTIONS
{
. = 1M;
.text BLOCK(4K) : ALIGN(4K)
{
*(.multiboot)
*(.text)
}
.rodata BLOCK(4K) : ALIGN(4K)
{
*(.rodata)
}
.data BLOCK(4K) : ALIGN(4K)
{
*(.data)
}
.bss BLOCK(4K) : ALIGN(4K)
{
*(COMMON)
*(.bss)
*(.bootstrap_stack)
}
}
Code: Select all
.................. -> 0xFFFFFF
|................|
|................|
|................|
|................|
================== -> 0x?????? (kernel size)
|................|
|................|
================== -> 0x100000 (lower memory - bootloader, video ...)
|................|
|................|
.................. -> 0x000000