From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 33E51BBC4 for ; Tue, 31 Mar 2009 18:24:50 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsMCAPfg0UmG1L4Ej2dsb2JhbACBU5QwAQEBAQkLCBq3coN6Bg X-IronPort-AV: E=Sophos;i="4.38,453,1233529200"; d="asc'?scan'208";a="25362062" Received: from briaree.onecert.fr ([134.212.190.4]) by mail3-smtp-sop.national.inria.fr with ESMTP; 31 Mar 2009 18:24:49 +0200 Received: from neree.onecert.fr (thetis.onecert.fr [134.212.178.12]) by briaree.onecert.fr (8.14.1/8.14.1/ONERA-SRI) with ESMTP id n2VGOLAa017305; Tue, 31 Mar 2009 18:24:21 +0200 Received: from neree.onecert.fr (thetis.antiviral [127.0.0.1]) by neree.onecert.fr (8.13.8/8.13.8/ONERA-SRI) with ESMTP id n2VGOKRU003851; Tue, 31 Mar 2009 18:24:20 +0200 Received: from laios.cert.fr (laios.cert.fr [134.212.230.128]) by neree.onecert.fr (8.13.8/8.13.8/ONERA-SRI) with ESMTP id n2VGOKec003846; Tue, 31 Mar 2009 18:24:20 +0200 Received: from [134.212.230.42] (castres [134.212.230.42]) by laios.cert.fr (8.11.7p1+Sun/8.11.7) with ESMTP id n2VGOK118552; Tue, 31 Mar 2009 18:24:20 +0200 (MEST) Message-ID: <49D243B0.6020103@onera.fr> Date: Tue, 31 Mar 2009 18:24:16 +0200 From: =?ISO-8859-1?Q?Pierre-Lo=EFc_Garoche?= User-Agent: Thunderbird 2.0.0.18 (X11/20081120) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Cc: thirioux@enseeiht.fr Subject: Dynamic loading of native code : what about librairies and packs ? X-Enigmail-Version: 0.95.7 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigDB1267A9E687B81F868559B4" X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (briaree.onecert.fr [134.212.190.4]); Tue, 31 Mar 2009 18:24:21 +0200 (CEST) X-Spam: no; 0.00; librairies:01 compilation:01 cmx:01 cmxa:01 ocamlopt:01 -shared:01 ocamlopt:01 -shared:01 mylib:01 cmxa:01 cmx:01 -linkall:01 mylib:01 -pack:01 -for-pack:01 X-Attachments: type="application/pgp-signature" name="signature.asc" name="signature.asc" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigDB1267A9E687B81F868559B4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I am discovering this feature of loading dynamically native code. The Frama-C framework (www.frama-c.cea.fr) provides now a plugin architecture that allows you to develop your own plugin and loads it directly in the framework. I targeted to adapt a simple tool I developped as a Frama-C plugin and faced some difficulties. I did not found enough information about the compilation of cmxs files. ** First: what about external libraries ? Could you detail the behavior of the linking process of cmxs file with respect to dependancies. If I understand well any library used to compile cmx files should be - either know by the software dynamically loading the plugin, - or its cmxa should be passed as argument of ocamlopt -shared command. But what is the difference between: ocamlopt.opt -shared mylib.cmxa xxx.cmx yyy.cmx -o target.cmxs and ocamlopt.opt -shared -linkall mylib.cmxa xxx.cmx yyy.cmx -o target.cmx= s Both seems to work similarly on my example (no differences between resulting files). ** Second: how about packs ? Does the option "-shared -o target.cmxs" is similar to "-pack -o target.cmx", without the dynamic loading thing ? And what if the plugin components (cmx files) are or are not compiled with the "-for-pack" optio= n ? Any information would be greatly appreciated. Best regards, pl --=20 Pierre-Lo=EFc Garoche pierre-loic.garoche@onera.fr http://www.onera.fr/staff/pierre-loic-garoche/ --------------enigDB1267A9E687B81F868559B4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFJ0kO0R86freTiNRgRAtkHAJ42ymI50jALBiw7NWSBpOXyjsAF/gCg722o lxi0LrC05TwoLV94nWtmFWM= =IjBh -----END PGP SIGNATURE----- --------------enigDB1267A9E687B81F868559B4--