On Fri, Sep 14, 2012 at 1:31 AM, Evan Laforge <[email protected]> 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                                      [email protected]
wandering unix systems administrator (available)     (412) 475-9364 vm/sms
_______________________________________________
Glasgow-haskell-users mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to