how the boot loader knows kernel start address?
Posted: Mon Apr 17, 2006 10:07 am
if you specify a linker script like below,
OUTPUT_FORMAT("binary")
ENTRY(start)
phys = 0x00100000;
SECTIONS
{
.text phys : AT(phys) {
code = .;
*(.text)
. = ALIGN(4096);
}
.data : AT(phys + (data - code))
{
data = .;
*(.data)
. = ALIGN(4096);
}
.bss : AT(phys + (bss - code))
{
bss = .;
*(.bss)
. = ALIGN(4096);
}
end = .;
}
how the boot loader knows to load the kernel at 0x00100000?
i think although the kernel is binary file, the kernel must has some header to tell the loader how to load it, i think it is same as elf,fat file.
OUTPUT_FORMAT("binary")
ENTRY(start)
phys = 0x00100000;
SECTIONS
{
.text phys : AT(phys) {
code = .;
*(.text)
. = ALIGN(4096);
}
.data : AT(phys + (data - code))
{
data = .;
*(.data)
. = ALIGN(4096);
}
.bss : AT(phys + (bss - code))
{
bss = .;
*(.bss)
. = ALIGN(4096);
}
end = .;
}
how the boot loader knows to load the kernel at 0x00100000?
i think although the kernel is binary file, the kernel must has some header to tell the loader how to load it, i think it is same as elf,fat file.