caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: STARYNKEVITCH Basile <Basile.Starynkevitch@cea.fr>
To: skaller <skaller@maxtal.com.au>
Cc: caml-list@inria.fr
Subject: Dynamic loading and building of shared libraries
Date: Mon, 17 Jan 2000 09:00:18 +0100 (MET)	[thread overview]
Message-ID: <14466.52242.355625.339910@gargle.gargle.HOWL> (raw)
In-Reply-To: <387FD815.6FF50F15@maxtal.com.au>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 1537 bytes --]

>>>>> "skaller" == skaller  <skaller@maxtal.com.au> writes:

    skaller> I have a need to load sets of ocaml functions at run time
    skaller> in Viper using dlopen [...]

    skaller> At the moment, these functions must be statically linked
    skaller> into the interpreter, which is not really acceptable.

    skaller> It should be easy to provide a C factory function in a
    skaller> shared library that returns a table of functions: my
    skaller> question is, how to tell ocaml to link a shared library,
    skaller> rather than a main executable.

    skaller> How do I do this? If not, can a way be devised to tell
    skaller> ocamlopt to do it? Or is there a reasone it isn't
    skaller> possible?

Dynamically loaded shared objects are usually made with position
independent code. This requires that the ocamlopt code generator
follows some (perhaps tricky) coding conventions (which might also
require some changes in the runtime GC system)

I agree with John Skaller that dynamic library support in ocamlopt
would be nice.

Regards

N.B. Any opinions expressed here are only mine, and not of my organization.
N.B. Les opinions exprimees ici me sont personnelles et n engagent pas le CEA.

---------------------------------------------------------------------
Basile STARYNKEVITCH   ----  Commissariat à l Energie Atomique 
DTA/LETI/DEIN/SLA * CEA/Saclay b.528 (p111f) * 91191 GIF/YVETTE CEDEX * France
phone: 1,69.08.60.55; fax: 1.69.08.83.95 home: 1,46.65.45.53
email: Basile point Starynkevitch at cea point fr 




      parent reply	other threads:[~2000-01-17 10:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-29  9:41 Threads Library David McClain
2000-01-13  9:32 ` Xavier Leroy
2000-01-15  2:14   ` Dynamic loading and building of shared libraries skaller
2000-01-17  3:59     ` Ian Zimmerman
2000-01-17  8:00     ` STARYNKEVITCH Basile [this message]

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=14466.52242.355625.339910@gargle.gargle.HOWL \
    --to=basile.starynkevitch@cea.fr \
    --cc=caml-list@inria.fr \
    --cc=skaller@maxtal.com.au \
    /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).