title: Remove C++-STL/Boost debug symbols (... or do not create them)
body: <p>Linux/Gcc/LD - Toolchain.</p>
  
  <p>I would like to remove STL/Boost debug symbols from libraries and executable, for two reasons:</p>
  
  <ol>
  <li>Linking gets very slow for big programs</li>
  <li>Debugging jumps into stl/boost code, which is annoying</li>
  </ol>
  
  <p>For 1. incremental linking would be a big improvement, but AFAIK ld does not support incremental linking. There is a workaround "pseudo incremental linking" in an 1999 dr.dobb's journal (not in the web any more, but at <a href="http://web.archive.org/web/20000131063231/www.ddj.com/articles/1999/9910/9910d/9910d.htm" rel="nofollow noreferrer">archive.org</a> (the idea is to put everything in a dynamic library and all updated object files in an second one that is loaded first) but this is not really a general solution.</p>
  
  <p>For 2. there is a script <a href="http://ubuntuforums.org/showthread.php?p=4368377" rel="nofollow noreferrer">here</a>, but a) it did not work for me (it did not remove symbols), b) it is very slow as it works at the end of the pipe, while it would be more efficient to remove the symbols earlier.</p>
  
  <p>Obviously, the other debug symbols should stay in place.</p>