Page 1 of 1

need help with linking

Posted: Thu Oct 26, 2006 9:40 am
by odin
hi all and sorry for my english.
i have a several questions about linking.

let's look at the linux kernel. it has "lower half", "middle half" and "hier half".
"lower half" is a linux bootloader.
"middle half" is setup.S and head.S, etc. it starts at 0x100000
"hier half" it starts 0xC0000000

so, in the linux kernel it's not any linking from virtual address to physical. such as, for example:

/* ... */
.text 0xC0000000 : AT (0x100000)
{
text_start = .;
*(.text)
}
/* ... */

it'sstiffly parted at 2 separate parts: 0x100000 and 0xC0000000.

so, the first question is:
what benefits can give this approach?

i, for example, use grub as my os bootloader. and immediately after grub loads my kernel i enable paging and after it redefine gdt.
what demerits has this approach in comparison with previous?

thanks.