From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA03889 for caml-red; Wed, 29 Nov 2000 22:03:06 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA11066 for ; Wed, 29 Nov 2000 16:42:34 +0100 (MET) Received: from cremant.inria.fr (cremant.inria.fr [128.93.8.143]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id eATFgGf10838; Wed, 29 Nov 2000 16:42:16 +0100 (MET) Received: (from lefessan@localhost) by cremant.inria.fr (8.11.0/8.11.0) id eATGgF301084; Wed, 29 Nov 2000 17:42:15 +0100 X-Authentication-Warning: cremant.inria.fr: lefessan set sender to fabrice.le_fessant@inria.fr using -f From: Fabrice Le Fessant MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14885.12770.825697.215308@cremant.inria.fr> Date: Wed, 29 Nov 2000 17:42:10 +0100 (CET) To: Vitaly Lugovsky Cc: caml-list@inria.fr Subject: Re: Dynamic loading. Again. References: X-Mailer: VM 6.75 under Emacs 20.7.1 Reply-To: fabrice.le_fessant@inria.fr Sender: weis@pauillac.inria.fr 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 orders. Regards, - Fabrice Homepage: http://pauillac.inria.fr/~lefessan