Snow Leopard GHC

Barney Stratford barney_stratford at
Thu Sep 24 18:54:33 EDT 2009

Only limited success with GHCi, I'm afraid. The problem seems to be  
that Snow Leopard is much stricter about security than Leopard was.  
(Caveat - I don't really know what I'm talking about.) In particular,  
I don't think it will let you execute code outside of the __TEXT  
segment, which is exactly what GHCi tries to do - hence the bus errors.

I've tried just letting the dynamic linker (dyld) sort everything out  
for us, but this failed because not all symbols are dynamically  
linked, and the statically linked ones are invisible to it.

One change that will be necessary in any case: towards the end of rts/ 
Linker.c, change
             case X86_64_RELOC_SIGNED:
                 thing += value - baseValue;


             case X86_64_RELOC_SIGNED:
             case X86_64_RELOC_SIGNED_1:
             case X86_64_RELOC_SIGNED_2:
             case X86_64_RELOC_SIGNED_4:
                 thing += value - baseValue;

I won't be able to hack on this any more for a few days, as I'm off to  
the mountains. Maybe someone else can try.


More information about the Glasgow-haskell-users mailing list