caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Jeff Henrikson" <jehenrik@yahoo.com>
To: "malc" <malc@pulsesoft.com>, "Patrick M Doane" <patrick@watson.org>
Cc: "Will Benton" <willb@cs.wisc.edu>, <caml-list@inria.fr>
Subject: [Caml-list] ELF i386 dynamic linking patch. was: License Conditions for OCaml
Date: Fri, 9 Nov 2001 09:46:00 -0500	[thread overview]
Message-ID: <002e01c1692d$3f64cce0$0b01a8c0@mit.edu> (raw)
In-Reply-To: <Pine.LNX.4.21.0111091407540.551-100000@oyster>

> > OCaml doesn't provide support for shared libraries (although 3.03 does
> > provide some dynamic loading capabilities for bytecode only). So we
> > need to consider the portions of the license that apply for static
> > linking. The LGPL provides some rather contradictory statements in section
> > 6 regarding that:
> While this is true for stock ocaml, there is a patch that adds shared
> linking support to 3.03Alpha, with limited scope though - i386 ELF only.
> (shameless plug) You can find it here http://algol.prosalg.no/~malc/scaml

Yes, but those pesky gensym integers lying around prevent exactly this thing.  That is, if I write a library, compile to an
.so/.cmxa pair, and link to it, all is apparently well in the world.  Then if I try to change the implementation of the library but
leave the interfaces alone, I find out all the symbol names will change randomly, eg

	myFunction243     to     myFunction247

Fixing this may be as simple as removing a %s from the source.  I don't know, as I didn't dig that deep.  I also have a suspicion
that entry points are sometimes not unique.  I periodically hear things about multiple optimized entry points and I don't know if
that affects their symbol names.  I would presume it would, which would be another screw case to work on.

The question is that if you provide an .mli, are multiple entry points ever generated.  Actually, the real question is a little
more strict: given an .mli file, are the symbols generated well-defined (except for the arbitrary integer), and will they still be
unique if the integer is deleted?  Does any kind guru care to comment?

Though you aren't defining a calling convention or symbol naming scheme from scratch, you are still, in a sense, defininig a binary
interface here.  IMHO extreme paranoia is warranted!  ;-)

BTW, if you can address these concerns to my satisfaction, (And I wish other people were commenting on this.  The list was
strangely silent when you posted this patch- Am I the only one thinking this is extremely important?)  I'm happy to port it to the
windows dynamic linker.  I already did this for another linking library whose limitations I don't like too much any more.  (dlopen)


Jeff Henrikson


-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


  reply	other threads:[~2001-11-09 14:32 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-09  4:30 [Caml-list] " Patrick M Doane
2001-11-09  4:48 ` Rafael 'Dido' Sevilla
2001-11-09  8:45   ` Xavier Leroy
2001-11-09 15:52     ` Dave Scott
2001-11-09 16:40     ` David Brown
2001-11-09 16:40     ` Brian Rogoff
2001-11-12  8:07       ` Tom
2001-11-12 15:58         ` David Brown
2001-11-09  4:49 ` Will Benton
2001-11-09  5:35   ` Patrick M Doane
2001-11-09  5:53     ` Michael Welsh Duggan
2001-11-09  5:58       ` Patrick M Doane
2001-11-09  9:27         ` Sven
2001-11-09  9:58           ` Julian Assange
2001-11-09 10:37             ` Sven
2001-11-09 15:39             ` Patrick M Doane
2001-11-09 15:36           ` Patrick M Doane
2001-11-09  9:25     ` Sven
2001-11-09 15:33       ` Patrick M Doane
2001-11-09 16:26         ` Tom
2001-11-11 12:25         ` Sven
2001-11-09 11:09     ` malc
2001-11-09 14:46       ` Jeff Henrikson [this message]
2001-11-10  0:32         ` [Caml-list] Re: ELF i386 dynamic linking patch. was: " malc
2001-11-09  5:50 ` [Caml-list] " Michael Welsh Duggan
2001-11-09  8:59 ` Sven
2001-11-09 15:13   ` Patrick M Doane
2001-11-11 12:00     ` Sven
2001-11-11 14:56       ` Patrick M Doane
2001-11-26 16:21     ` Fergus Henderson
2001-11-26 16:47       ` Patrick M Doane
2001-11-27 10:28         ` Fergus Henderson
2001-11-27 10:58           ` Rafael 'Dido' Sevilla
2001-11-28 18:00             ` Xavier Leroy
2001-11-30  8:05               ` Sven
2001-11-09 20:54 ` Vitaly Lugovsky
2001-11-09 21:39   ` Patrick M Doane
2001-11-11 12:42     ` Sven
2001-11-11 22:05       ` Tom

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='002e01c1692d$3f64cce0$0b01a8c0@mit.edu' \
    --to=jehenrik@yahoo.com \
    --cc=caml-list@inria.fr \
    --cc=malc@pulsesoft.com \
    --cc=patrick@watson.org \
    --cc=willb@cs.wisc.edu \
    /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).