English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Dynamically loading code
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-08-26 (12:15)
From: Jonathan Roewen <jonathan.roewen@g...>
Subject: [Caml-list] Dynamically loading code

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

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,