title: What does ld do when linking against dynamic shared library?
body: <p>When linking an application against a dynamic shared library such as in</p>
  
  <pre><code>gcc -o myprog myprog.o -lmylib
  </code></pre>
  
  <p>I know the linker (<code>ld</code> on my Linux) use the -l option to store in the produced myprog ELF executable file the name of the library (<code>mylib</code> in this case) that will be used at load and link time (both when the program will be started if we ignore lazy dynamic linking). I am wondering what are the other jobs perform by <code>ld</code> (I am only speaking of the static linking step done at compilation time) regarding the dynamic shared library ?</p>
  
  <ul>
  <li><code>ld</code> must checks for undefined symbol existence in provided dynamic shared libraries</li>
  <li>any other stuff ?</li>
  </ul>
  
  <p>Moreover, I will be interested on pointers you are using (books, online documentation) regarding ELF format and dynamic linking and loading processes.</p>