Hi! I made a simple run-time linker, and now every module (loaded by grub) is able to use any other's functions and data. Now the primary kernel would also, but ld doesn't leave any undefined references which I would patch with symbols from other modules.. so is there a way to leave the undefined references there?
Cheers,
Adrian
leaving undefined references by ld
Re:leaving undefined references by ld
latebinding, no, unless you created the kernel as an object itself...
so what grub loads can be your linker, your main kernel etc can all be objects...
so what grub loads can be your linker, your main kernel etc can all be objects...
-- Stu --
Re:leaving undefined references by ld
As I imagined it, I want to use an object repository for all objects the modules use, so I don't have to link the modules with the kernel (still severely limits a design) but just make new modules separate from the kernel, and map them using a database (module with this class & this type, use this driver). That would make them all dynamic.
To make the modules all be able to use the kernel, I want a partial linker in my kernel. At least up to the level that it can link additional objects into the system at runtime, so it can use them like native.
I am also planning on devising some sort of PLT-like linking table so I can make the calls to other modules as quick as just calling the kernel.
I also want a module fixer for each system, so you leave the object completely unlinked as a portable driver, then "install" it as a nonportable driver with the links to the OS linked permanently and the others still open, and then the last state as loaded with all links established (which isn't much different from the second, possibly none).
Hope to help your design,
Candy
To make the modules all be able to use the kernel, I want a partial linker in my kernel. At least up to the level that it can link additional objects into the system at runtime, so it can use them like native.
I am also planning on devising some sort of PLT-like linking table so I can make the calls to other modules as quick as just calling the kernel.
I also want a module fixer for each system, so you leave the object completely unlinked as a portable driver, then "install" it as a nonportable driver with the links to the OS linked permanently and the others still open, and then the last state as loaded with all links established (which isn't much different from the second, possibly none).
Hope to help your design,
Candy
Re:leaving undefined references by ld
Thank you for your reply.
Candy: I see you have designed your method in every aspect! At this moment I'll be trying to make it as simple as possible but, I will think about all those nifty features. What do you think of a system where all modules are in kernel space and none in user? Something like Linux, I don't like the microkernel design very much.
DF: That seems a good idea.. one more question: it seems my kmalloc() implementation is needed by the linker, does it have any meaning it will be loaded with the linker's module?
Cheers,
Adrian.
Candy: I see you have designed your method in every aspect! At this moment I'll be trying to make it as simple as possible but, I will think about all those nifty features. What do you think of a system where all modules are in kernel space and none in user? Something like Linux, I don't like the microkernel design very much.
DF: That seems a good idea.. one more question: it seems my kmalloc() implementation is needed by the linker, does it have any meaning it will be loaded with the linker's module?
Cheers,
Adrian.
Re:leaving undefined references by ld
<pype>
the very interresting content of this post have been promoted to a thread of its own as it start drifting from the topic, and will probably drift even more once i (or someone else) will respond to it
</pype>
the very interresting content of this post have been promoted to a thread of its own as it start drifting from the topic, and will probably drift even more once i (or someone else) will respond to it
</pype>