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

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2000-11-29 (21:03)
From: Fabrice Le Fessant <fabrice.le_fessant@i...>
Subject: Re: Dynamic loading. Again.

Last year, Mark Hayden and I did some work on dynamic linking of
native code for Linux. It worked, with few modifications in the
compiler to generate relocatable code in the ELF format, but the code
was really big (something like twice the normal size) and really slow
(about twice slower). It was for ocaml 2.??, but it should probably
work with a few changes for the current version. If you want the
patch, I will try to find it in my archives. It was a few days work,
so we dit not optimize it as it should be, but it can be used as a
start point.

If you are only interested with linking some code -- not time
critical --, you can try the dynlink library which is included in the efuns
package (http://pauillac.inria.fr/efuns). It will allow you to
dynamically link BYTECODE modules inside NATIVE code programs. These
modules will be executed slower than the native code, and even slower
than the bytecode run by ocamlrun, but they will use native functions
for all functions which were included in the program, so that it would
be good to execute powerful configuration scripts, or computation


- Fabrice

Homepage: http://pauillac.inria.fr/~lefessan