<div dir="ltr">On Fri, Sep 14, 2012 at 1:31 AM, Evan Laforge <span dir="ltr"><<a href="mailto:qdunkan@gmail.com" target="_blank">qdunkan@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Relatedly, I've noticed that OS X is forgiving when you don't link in<br>
a needed object. It will let me run code, but if I call a function<br>
that's not linked in I get a crash. However, linux immediately prints<br>
"unknown symbol `etc.'". The OS X behaviour is more convenient<br>
because it's easy to avoid calling the missing functions, and<br>
difficult to figure out how to cut all the dependencies so they're not<br>
needed, but the linux way is certainly safer. Does anyone know why<br>
this difference exists? Just curious.<br></blockquote><div><br></div><div>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.</div>
<div><br></div><div>("man ld.so" on Linux, "man dyld" on OS X, for the details)</div><div><br></div></div>-- <br>brandon s allbery <a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a><br>
wandering unix systems administrator (available) (412) 475-9364 vm/sms<br><br>
</div>