End of the kernel [solved]
Posted: Sat Mar 21, 2009 4:46 pm
i need to know where my kernel end. I read that a good solution is to set up a symbol with the linker script.
If i understood correctly, i tell the linker to set up some memory with a symbol that i decide at the end of the kernel, so i'll search it and where i found it is the end of the kernel. This is correctly? and how can i do this? i use the follow linker script:
thank's for the answers and sorry for my bad english.. i hope you understand..
If i understood correctly, i tell the linker to set up some memory with a symbol that i decide at the end of the kernel, so i'll search it and where i found it is the end of the kernel. This is correctly? and how can i do this? i use the follow linker script:
Code: Select all
OUTPUT_FORMAT("binary")
ENTRY(start)
phys = 0x00100000;
SECTIONS
{
.text phys : AT(phys) {
code = .;
*(.text)
*(.rodata)
. = ALIGN(4096);
}
.data : AT(phys + (data - code))
{
data = .;
*(.data)
. = ALIGN(4096);
}
.bss : AT(phys + (bss - code))
{
bss = .;
*(.bss)
. = ALIGN(4096);
}
end = .;
}