<div dir="ltr">On Fri, Sep 14, 2012 at 1:31 AM, Evan Laforge <span dir="ltr">&lt;<a href="mailto:qdunkan@gmail.com" target="_blank">qdunkan@gmail.com</a>&gt;</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&#39;ve noticed that OS X is forgiving when you don&#39;t link in<br>
a needed object.  It will let me run code, but if I call a function<br>
that&#39;s not linked in I get a crash.  However, linux immediately prints<br>
&quot;unknown symbol `etc.&#39;&quot;.  The OS X behaviour is more convenient<br>
because it&#39;s easy to avoid calling the missing functions, and<br>
difficult to figure out how to cut all the dependencies so they&#39;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>(&quot;man ld.so&quot; on Linux, &quot;man dyld&quot; 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>