title: Compiling with debug symbols requires additional libraries?
body: <p>I have a curious problem: When building object files with <code>-g</code>, the linker suddenly complains about missing symbols from <code>libbar</code> on wich my tool depends indirectly through <code>libfoo</code>. This does not happen without <code>-g</code>.</p>
  
  <p>These symbols seem to be coming from default parameters to functions in <code>libfoo</code> which are objects from <code>libbar</code>. These functions are, however, not used by my tool.</p>
  
  <p>I wonder how this additional dependency is caused by debug builds - is it possible that these debug symbols are produced for all symbols, not only the ones I use, and for these debug symbols, the default parameters are also required?</p>
  
  <p>This is with Sun Studio 5.10 on Solaris.</p>