mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00:00
Kernel: Implement very simple kernel module loading
It's now possible to load a .o file into the kernel via a syscall. The kernel will perform all the necessary ELF relocations, and then call the "module_init" symbol in the loaded module.
This commit is contained in:
12
Kernel/TestModule.cpp
Normal file
12
Kernel/TestModule.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include <Kernel/kstdio.h>
|
||||
|
||||
extern "C" void outside_func();
|
||||
|
||||
extern "C" void module_init()
|
||||
{
|
||||
kprintf("TestModule has booted!\n");
|
||||
|
||||
for (int i = 0; i < 99; ++i) {
|
||||
kprintf("i is now %d\n", i);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user