Version 1 (modified by 18 years ago) ( diff ) | ,
---|
kLdr - The Dynamic Loader
I've got several different places now where I need a cross platform dynamic (executable image) loader and can do more than just dlopen/dlsym/dlclose. In addition to having to support all kinds of formats, it also has to be able to load images that won't run on the host cpu. Like for instance a 64-bit ELF image on a 32-bit Windows or OS/2 host system. Another requirement is to be able to relocate the module *after* it has been loaded. And of course, it also need to be able to do standard dynamic linking - i.e. load the executable and it's prerequisites on execv/spawn, and to do dlopen/dlsym/dlclose.
Support for LX, MACH-O, PE and ELF (in that priority) is planned. It's possible that a.out will be added too.
links
- A state diagram for the dynamic loader modules can be found here: http://svn.netlabs.org/libc/browser/trunk/kLdr/tg/KLDRSTATE.gif