Page 1 of 1
Kernel modules?
Posted: Sun Jan 25, 2004 12:00 am
by St8ic
I was just wondering if anyone has set up the ability to use kernel modules in their os yet. And if so, how? Any links or info you can provide?
Thanks!
RE:Kernel modules?
Posted: Sun Jan 25, 2004 12:00 am
by Adek336
Firstly, use a bootloader able to load multiple modules(GRUB). Then you read the module list (check the multiboot standard how to access it), which gives you module count, each module's name,start+end in memory.
From there you have to write some support for whatever you use, may it be elf, pe etc.
And finally, you write a linker to link unresolved references across modules.
In panalix every global symbol may be exported, but you may want to limit the symbols accessable (a good VGA driver should not use kernel's This_Variable_Will_Not_Be_Valid_In_The_Next_Release).
As to implementation- you could store a list of global symbols and a list of unresolved symbols, then try to resolve the latter.
Cheers,
Adrian.
RE:Kernel modules?
Posted: Sun Jan 25, 2004 12:00 am
by EyeScream
Just as one little thing to add. I personally can recommend using COFF or plain a.out for modules because they are easier to load (e.g. there are fewer types of objects inside them and less additional info, especially when compared to ELF).