Understanding the boot process?
I'm trying to develop my own OS (call me crazy, but it's challenging and I want to do that).
I wrote a boot loader and the code that initializes my (not yet existing) kernel in assembly language. Now I'm trying to write my kernel in C. And here my first real problem occurs. Ok, I've not come far but anyway:
Can anybody explain to me how kernel sources have to be linked? I checked the linux sources and makefiles for help, but I don't really understand it.
If I compile my stuff the way the linux kernel is compiled, ld always assumes that my main function starts at something like 0x08048090, but I actually load it at somewhere about 0x6000 (0x0008:0x6xxx in 32bit pm).
Does anybody know how I can tell gcc or ld to organize the memory the way I want it or how the linux kernel linking process really works?
(Linux 0.0.0.1 is first loaded at 0x1000:0 and then copied down to 0x0000 (real mode), so there should have been the same problem).