caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Alain Frisch <Alain.Frisch@inria.fr>
To: Brian Hurt <bhurt@janestcapital.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Dynamic linking
Date: Fri, 15 Jun 2007 20:24:20 +0200	[thread overview]
Message-ID: <4672D954.7080208@inria.fr> (raw)
In-Reply-To: <4672C3BB.3040106@janestcapital.com>

Brian Hurt wrote:
> B) How extensive were the changes to the Ocaml source code?

For Linux x86, the change is rather small and straightforward.

For Windows ports, it is more tricky, because a Windows DLL cannot
reference symbols from the main program. I wrote the FlexDLL tool to
simulate a POSIX-ish dlopen API, so that the patch to OCaml itself
mostly reduces to removing code or sharing Makefiles with Unix. All the
trouble is encapsulated into FlexDLL (which is itself a quite small
piece of code, but a tricky one).

>From Linux AMD64, the ABI/dynamic linker does not allow to dynamically
load position dependant code, so I had to modify the last stage of
ocamlopt's backend in order to produce PIC code (when the option -dlcode
is given; note that this is independant from the existing -fpic option,
details on demand). Again, this is a rather small and unintrusive change.

You can use CVS to get a diff between the ocaml3100 tag and the
natdynlink branch (but it won't show you new files; you can always "cvs
checkout" both and do a local diff).

> How likely
> is it that this will get included in some future version of the main trunk?

It is likely to be included in OCaml 3.11, not before. (Except for the
native toplevel which will probably not be included.) Of course,
feedback can only help for the integration.

-- Alain


  reply	other threads:[~2007-06-15 18:24 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-15 16:03 Alain Frisch
2007-06-15 16:47 ` [Caml-list] " Joel Reymont
2007-06-15 16:52 ` Brian Hurt
2007-06-15 18:24   ` Alain Frisch [this message]
2007-06-15 18:59     ` Jon Harrop
2007-06-15 20:57       ` Alain Frisch
2007-06-15 22:38     ` Quôc Peyrot
2007-06-16  7:23       ` Alain Frisch
2007-06-16 17:33     ` Jon Harrop
2007-06-16 17:59       ` skaller
2007-06-16 20:13         ` Christophe TROESTLER
2007-06-16 23:10         ` Philippe Wang
2007-06-15 22:37 ` skaller
2007-06-15 22:45   ` Christophe TROESTLER
2007-06-15 22:58     ` skaller
2007-06-20 13:40 ` Alain Frisch
2007-06-24 11:35 ` Jon Harrop
  -- strict thread matches above, loose matches on Subject: below --
2007-06-18  4:18 Jeffrey Loren Shaw
2005-10-05 13:11 Alexander Bottema
2005-10-04 15:56 Alexander Bottema
2005-10-05  8:14 ` skaller
2005-10-04 12:47 Alexander Bottema
2005-10-04 14:47 ` skaller
2005-09-28 12:44 Alexander Bottema
2005-09-26  3:09 Jonathan Roewen
2005-09-26  4:26 ` skaller
2005-09-26  5:14 ` Jacques Garrigue
2005-09-26  5:20   ` Jonathan Roewen
2005-09-28  9:05   ` Jacques Garrigue
2005-04-05 21:12 Emir Pasalic
2005-04-05 22:02 ` [Caml-list] " Igor Pechtchanski

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=4672D954.7080208@inria.fr \
    --to=alain.frisch@inria.fr \
    --cc=bhurt@janestcapital.com \
    --cc=caml-list@yquem.inria.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).