caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Dynamic loading of native code : what about librairies and packs ?
@ 2009-03-31 16:24 Pierre-Loïc Garoche
  2009-03-31 16:34 ` [Caml-list] " Alain Frisch
  2009-04-01  9:02 ` Julien Signoles
  0 siblings, 2 replies; 8+ messages in thread
From: Pierre-Loïc Garoche @ 2009-03-31 16:24 UTC (permalink / raw)
  To: caml-list; +Cc: thirioux

[-- 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 --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-09-01 10:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-31 16:24 Dynamic loading of native code : what about librairies and packs ? Pierre-Loïc Garoche
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

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