ghc api and .o files
allbery.b at gmail.com
Fri Sep 14 20:22:26 CEST 2012
On Fri, Sep 14, 2012 at 1:31 AM, Evan Laforge <qdunkan at gmail.com> wrote:
> Relatedly, I've noticed that OS X is forgiving when you don't link in
> a needed object. It will let me run code, but if I call a function
> that's not linked in I get a crash. However, linux immediately prints
> "unknown symbol `etc.'". The OS X behaviour is more convenient
> because it's easy to avoid calling the missing functions, and
> difficult to figure out how to cut all the dependencies so they're not
> needed, but the linux way is certainly safer. Does anyone know why
> this difference exists? Just curious.
Because the system dynamic loader has different defaults. OS X defaults to
a lazier lookup than Linux does; Linux is actually somewhat lazy about it,
just not as lazy as OS X. Unfortunately I only know how to make them both
stricter, not lazier.
("man ld.so" on Linux, "man dyld" on OS X, for the details)
brandon s allbery allbery.b at gmail.com
wandering unix systems administrator (available) (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Glasgow-haskell-users