From: Alain Frisch <alain@frisch.fr>
To: Joel Stanley <jstanley@galois.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Dynamic libs w/ Ocaml + C code under Mac OS X
Date: Tue, 05 Feb 2008 22:49:46 +0100 [thread overview]
Message-ID: <47A8D9FA.2090206@frisch.fr> (raw)
In-Reply-To: <2E251B0B-EE9B-4F03-AA31-8924D554AB57@galois.com>
Joel Stanley wrote:
> ld -bundle -flat_namespace -undefined suppress -read_only_relocs
> suppress -o 'foo.so' '-L/Users/jstanley/hbin/lib/ocaml'
> 'foo.so.startup.o' 'simple.o' '/Users/jstanley/hbin/lib/ocaml/stdlib.a'
> 'wrapper.o' '/Users/jstanley/hbin/lib/ocaml/libasmrun.a'
>
> > ld: absolute addressing (perhaps -mdynamic-no-pic) used in
Ok, it makes sense. Now, if you replace ld with ld_classic, does it work?
> From the experiments that I've been doing, it really looks like PIC
> needs to be generated for the OS X linker to be happy. Do you have any
> assessment as to how much work this is? Keep in mind that I don't
> consider myself an x86 assembly hacker by any stretch of the imagination
> ;) I'd really like to just run this natively on my main platform, but
> if I can't, I can't.
Honestly, I don't know how hard it would be. You can look at what had to
be done for AMD64
(http://camlcvs.inria.fr/cgi-bin/cvsweb/ocaml/asmcomp/amd64/) and at how
one is supposed to produce PIC for x86 (gcc -fPIC).
Or you can try to convince Apple to restore "-read_only_relocs
suppress" in the new linker (I could find no indication that Apple
deliberately dropped this feature).
-- Alain
next prev parent reply other threads:[~2008-02-05 21:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-04 22:39 Joel Stanley
2008-02-05 4:52 ` [Caml-list] " Alain Frisch
2008-02-05 16:39 ` Joel Stanley
2008-02-05 21:00 ` Alain Frisch
2008-02-05 21:19 ` Joel Stanley
2008-02-05 21:49 ` Alain Frisch [this message]
2008-02-06 0:02 ` Joel Stanley
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=47A8D9FA.2090206@frisch.fr \
--to=alain@frisch.fr \
--cc=caml-list@yquem.inria.fr \
--cc=jstanley@galois.com \
/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