Browse thread
[Caml-list] Dynamically loading code
- Jonathan Roewen
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Jonathan Roewen <jonathan.roewen@g...> |
| Subject: | [Caml-list] Dynamically loading code |
Hi, I have a few questions about how to design a system in DST for loading ocaml applications (DST is an OCaml OS/kernel). I've noticed that the ocaml top level is capable of loading extlib at runtime using the #load "extLib.cma" directive. I also noticed that it seems capable of loading ELF files on a windows system, which begs the question: does ocaml use a custom loader for loading libraries at runtime?? Next in line: does this then suggest that I could add the capability to DST of loading ocaml libraries at runtime? And how easily would this extend to applications? My design goal is to have a single address space, and have kernel+libraries+apps running side by side, which indicates I'll need my own custom loader/runtime linker at the very least. Also, we'll probably be looking at loading bytecode anyways, but is it possible to create ocaml programs without statically linking in the various libraries it depends upon? For instance, the kernel could be capable of resolving symbols at runtime, providing the entry points to all needed libraries currently loaded in memory, with demand loading of any dependent libraries not yet present. Kindest Regards, Jonathan