title: Questions about "gcc: unrecognized option `-rdynamic'"
body: <p>I use <code>gcc</code> on <code>Solaris 10</code> to build <code>make</code> program, and get the following information:  </p>
  
  <pre><code>gcc: unrecognized option `-rdynamic'
  </code></pre>
  
  <p>After checking the <a href="https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Link-Options.html#index-rdynamic-1090" rel="nofollow">rdynamic</a> in <code>gcc</code> document, I get the following explantions:  </p>
  
  <pre><code>-rdynamic
  Pass the flag -export-dynamic to the ELF linker, on targets that support it. This instructs the linker to add all symbols, not only used ones, to the dynamic symbol table. This option is needed for some uses of dlopen or to allow obtaining backtraces from within a program. 
  </code></pre>
  
  <p>My questions are:  </p>
  
  <p>(1) Although <code>gcc</code> prints "<code>gcc: unrecognized option -rdynamic</code>", the build is still success. Is this the default behavior of <code>gcc</code>?  </p>
  
  <p>(2) I replace "<code>-rdynamic</code>" with "<code>-export-dynamic</code>" in Makefile, and the build is success. Is there any side-effect of this substitution?</p>
  
  <p>P.S. My <code>gcc</code> information:  </p>
  
  <pre><code>bash-3.00# gcc -v
  Reading specs from /usr/local/lib/gcc/i386-pc-solaris2.10/3.4.6/specs
  Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c,c++,f77
  Thread model: posix
  gcc version 3.4.6 
  </code></pre>