[MLton] Re: r6701

Matthew Fluet fluet at tti-c.org
Tue Aug 19 10:42:47 PDT 2008


On Tue, 19 Aug 2008, Wesley W. Terpstra wrote:
> On Tue, Aug 19, 2008 at 7:15 PM, Matthew Fluet <fluet at tti-c.org> wrote:
>> On Tue, 19 Aug 2008, Wesley W. Terpstra wrote:
>>
>>> I don't have a i386 with osx, but I gather from this checkin that .hidden
>>> doesn't work. Could someone try ".private_extern" instead?
>>
>> ".private_extern" seems to work for '-format archive'.
>> But, with '-format library', I get:
>>
>> ld: foo.0.o has local relocation entries in non-writable section (__TEXT,__text)
>> /usr/libexec/gcc/i686-apple-darwin8/4.0.1/libtool: internal link edit command failed
>
> That's because the i386 assembly isn't PIC, and osx requires PIC libraries
> (unlike linux) <
> http://hackage.haskell.org/trac/ghc/wiki/Commentary/PositionIndependentCode>.
> Grrrr.
>
> A text relocation is where the linker records what locations of the code
> need to be changed after loading a library. I was hopeful I wouldn't need
> PIC for i386. :-(

Well, I just wanted the compiler to build.  I don't have any need for 
MLton generated dynamically linked shared libraries on MacOS X.

-Matthew




More information about the MLton mailing list