title: Is there a downside to using -Bsymbolic-functions?
body: <p>I recently discovered the linker option "-Bsymbolic-functions" in GNU ld:</p>
  
  <pre><code>-Bsymbolic
    When creating a shared library, bind references to global symbols to the 
    definition within the shared library, if any. Normally, it is possible 
    for a program linked against a shared library to override the definition 
    within the shared library. 
  
    This option is only meaningful on ELF platforms which support shared libraries.
  
  -Bsymbolic-functions
    When creating a shared library, bind references to global function symbols 
    to the definition within the shared library, if any.  
  
    This option is only meaningful on ELF platforms which support shared libraries.
  </code></pre>
  
  <p>This seems to be the inverse of the GCC option <code>-fvisibility=hidden</code>, in that instead of preventing the export of the referenced function to other shared objects, it prevents library-internal references to that function from being bound to an an exported function of a different shared object. I informed myself that <code>-Bsymbolic-functions</code> will prevent the creation of PLT entries for the functions, which is a nice side effect.</p>
  
  <ol>
  <li><p>But I was wondering whether there is perhaps a finer-grained control over this, like overwriting <code>-Bsymbolic</code> for individual function definitions of a library. </p></li>
  <li><p>Should I be aware of any pitfalls of using <code>-Bsymbolic-functions</code>? I plan to only use that, because the <code>-Bsymbolic</code> will break exceptions, I think (it will make it so that references to typeinfo objects are not unified, I think). </p></li>
  </ol>
  
  <p>Thanks!</p>