need help with linking

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
odin
Posts: 1
Joined: Thu Oct 26, 2006 9:11 am

need help with linking

Post 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.
Post Reply