This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/60731] [4.7/4.8/4.9 Regression] dynamic library not getting reinitialized on multiple calls to dlopen()


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...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]