From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id A6D49BB9A for ; Mon, 26 Sep 2005 06:26:34 +0200 (CEST) Received: from ash25e.internode.on.net (ash25e.internode.on.net [203.16.214.182]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j8Q4QWDO028168 for ; Mon, 26 Sep 2005 06:26:33 +0200 Received: from rosella (ppp16-174.lns2.syd7.internode.on.net [59.167.16.174]) by ash25e.internode.on.net (8.12.9/8.12.6) with ESMTP id j8Q4QPII097949; Mon, 26 Sep 2005 13:56:25 +0930 (CST) (envelope-from skaller@users.sourceforge.net) Subject: Re: [Caml-list] Dynamic linking From: skaller To: Jonathan Roewen Cc: caml-list@yquem.inria.fr In-Reply-To: References: Content-Type: text/plain Date: Mon, 26 Sep 2005 14:26:27 +1000 Message-Id: <1127708787.28798.92.camel@rosella> Mime-Version: 1.0 X-Mailer: Evolution 2.2.1.1 Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 43377878.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 runtime:01 ocaml:01 cmi:01 cmx:01 cmi:01 runtime:01 dynlink:01 asmdynlink:01 bytecode:01 dlls:01 initialise:01 wrote:01 sourceforge:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 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 Felix, successor to C++: http://felix.sf.net