title: Under Linux, How C++ source code becomes executable files or static/dynamic libraries. And how a program get loaded into memory when it runs
body: <p>I know that source code can be compiled and linked to shared/static library or ELF executable files. And when program runs, it loads into memory and creates a process image according to ELF format. But I am not sure how programs loading shared libraries. How a linker looking for symbols in extern libraries and how the .a archive works. What else should I know if program runs on 64 bit OS?</p>
  
  <p>I am trying to draw a whole picture of it. Can someone give a general talk about the whole thing and gives references/documents/llinks so I can study them one by one.</p>
  
  <p>Thanks in advance.</p>
  
  <p>I think my question can be described as:</p>
  
  <p>Under Linux, How C++ source code becomes executable files or static/dynamic libraries. And how a program get loaded into memory when it runs. In GREATE details!</p>
  
  <p>And how many tools I can use to examine/manipulate the Linux binary files(executable files and libraries)? I know some as “nm" "readelf".</p>