title: Main Program and Shared Library initializes same static variable in __static_initialization_and_destruction_0
body: <p>Does anyone know why a library initialized within dlopen() would initialize a static variable owned by the main program.  Both the main program and shared library have a copy of the static variable, but for some reason the shared library re-initializes the main program's copy of the static variable and destructs it, causing a segfault when the main program attempts to destruct it.</p>
  
  <p>Is this a case of bad name mangling in the symbol table?</p>