caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Pierre-Loïc Garoche" <Pierre-Loic.Garoche@onera.fr>
To: caml-list@yquem.inria.fr
Cc: thirioux@enseeiht.fr
Subject: Dynamic loading of native code : what about librairies and packs ?
Date: Tue, 31 Mar 2009 18:24:16 +0200	[thread overview]
Message-ID: <49D243B0.6020103@onera.fr> (raw)

[-- Attachment #1: Type: text/plain, Size: 1463 bytes --]

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.cmxs

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" option ?


Any information would be greatly appreciated.

Best regards,

pl
-- 
Pierre-Loïc Garoche
pierre-loic.garoche@onera.fr
http://www.onera.fr/staff/pierre-loic-garoche/


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2009-03-31 16:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-31 16:24 Pierre-Loïc Garoche [this message]
2009-03-31 16:34 ` [Caml-list] " Alain Frisch
2009-03-31 16:38   ` Pierre-Loïc Garoche
2009-03-31 17:14     ` Alain Frisch
2009-09-01  8:56   ` Pierre-Loïc Garoche
2009-09-01  9:13     ` Christophe TROESTLER
2009-09-01 10:01     ` Alain Frisch
2009-04-01  9:02 ` Julien Signoles

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49D243B0.6020103@onera.fr \
    --to=pierre-loic.garoche@onera.fr \
    --cc=caml-list@yquem.inria.fr \
    --cc=thirioux@enseeiht.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).