http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60731
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Right, it was a deliberate choice in ld.so to suppress dlclose of DSOs that use
STB_GNU_UNIQUE, which causes problems with some code that relies on
reinitialization with dlclose/dlopen. As Ian says in
http://gcc.gnu.org/ml/gcc-help/2011-05/msg00450.html
this seems excessive; you only need to avoid unloading files that are
satisfying symbol references in another DSO. But I guess checking for that was
deemed too slow.
If you're using the gold linker, you can link with --no-gnu-unique to avoid the
use of STB_GNU_UNIQUE.
I suppose I should add a compiler flag to turn it off, too...