title: Automatically executed functions when loading shared libraries
body: <p>When loading shared libraries in Windows, <code>LoadLibrary()</code> call causes <code>DllMain</code> in library to execute for each new process and thread library attaches to, and for each process and thread library deattaches from.</p>
  
  <p>Is there similar mechanism for Mac OS X, Linux and possibly other POSIX-compatible OSs?</p>