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] Dynamic linking
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-09-26 (04:26)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] Dynamic linking
On Mon, 2005-09-26 at 15:09 +1200, Jonathan Roewen wrote:
> Hi,
> We're trying to figure out how to provide some sort of dynamic linker
> for DST to load ocaml native code at runtime on an ocaml native code
> kernel.
> Is there any document that details the format of .cmi/.cmx files;
> also, are these (esp .cmi) able to provide the necessary details on
> the symbols in the kernel for building a dynamic linker that can
> resolve symbols to kernel functions in ocaml code loaded at runtime?
> I know Dynlink module doesn't work with native code, and if I'm
> correct, the unsupported Asmdynlink module provided a runtime
> environment for bytecode ocaml code in native code programs right?
> Which is not what we'd be looking for.
> Sorry if my questions come across a bit weird: it's not an easy
> subject for me to think about ;-)

If you find out let me know .. since I've spent over 5 years
designing a new programming language primarily to solve this problem.
Had ocaml supported generating shared libraries (dlls) and 
dynamic loading of them, at the native code level, I would
have used Ocaml.

The bottom line is that basically it can 'just work', since
native code is just native code, all you really need is
that the library code link to the right symbols to
provide access to the run time (and of course you need
to initialise it).

John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net