On Mon, Sep 24, 2012 at 8:39 PM, Evan Laforge <qdunkan@gmail.com> wrote:
> ("man ld.so" on Linux, "man dyld" on OS X, for the details)

I thought ghc uses its own homegrown loader, not the system one?  I.e.
ghci loads .o files, not .dyld or .so.

The bytecode backend (used by ghci, TH, runghc) uses a separate loader; compiling uses the system loader.  Either way, though, the system's dynamic loader (which is invoked very early in initializing a new program) is always used because system libraries are usually shared; on ELF systems, it's also the "interpreter" for compiled programs so is unavoidable.  (I don't know if something similar is true for Mach-O.)

--
brandon s allbery                                      allbery.b@gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms