[Prev][Next][Index][Thread]

Re: relocating kernel to start at 0x00000000



Le Jeudi 30 Novembre 2000 13:23, Rogelio M. Serrano Jr. a écrit :
> I am planning to relocate my kernel at the very bottom of memory and start
> it from there. Had it been tried yet? I am thinking of linking the kernel
> at 0x00000000 then prepending to that image a custom boot.S linked to start
> at 1Meg. Boot.S then relocates the kernel and boot modules below 1Meg then
> jump to 0x00000000.

You will overwrite the interrupt table for real mode but it will work. You 
will certainly have troubles when you will leave your kernel. You will not 
properly reboot your machine.
If you are interested, I made a stub that uses the bfd library (from gdb) to 
link a kernel at the end of the memory of any machine, depending on the 
memory available and the size the kernel will have. It is a sort of reverse 
linking : a linking from the end of the program to its beginning. And it 
works !

References: