Kernel modules?

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
St8ic

Kernel modules?

Post 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!
Adek336

RE:Kernel modules?

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

RE:Kernel modules?

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