This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
Re: [Bug dynamic-link/16805] dynamic library not getting reinitialized on multiple calls to dlopen()
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: davejohansen at gmail dot com <sourceware-bugzilla at sourceware dot org>
- Cc: glibc-bugs at sourceware dot org
- Date: Wed, 23 Apr 2014 10:46:06 +0200
- Subject: Re: [Bug dynamic-link/16805] dynamic library not getting reinitialized on multiple calls to dlopen()
- Authentication-results: sourceware.org; auth=none
- References: <bug-16805-131 at http dot sourceware dot org/bugzilla/> <bug-16805-131-quzU6RCTD7 at http dot sourceware dot org/bugzilla/>
On Tue, Apr 22, 2014 at 03:42:13PM +0000, davejohansen at gmail dot com wrote:
> https://sourceware.org/bugzilla/show_bug.cgi?id=16805
>
> --- Comment #2 from Dave Johansen <davejohansen at gmail dot com> ---
> It's unclear what the plan of action is from that last comment. Is this issue
> going to be fixed?
>
> I realize that dlclose() only states an intent, but the fact remains that
> glibc/gcc is generating code that is doing the wrong thing. The same code built
> with clang++, the Intel C++ compiler and older versions of g++ do the right
> thing and I don't see why more current versions of gcc shouldn't do the right
> thing as well.
>
That is problem at gcc part, why it added unique symbol there.
> >From reading the comments on the gcc bugzilla and revision history of this
> change, it appears that it was made as an optimization to improve performance.
> Optimizations are great but they shouldn't be allowed to stick around if they
> introduce incorrect behavior and in this case it appears that this is a
> regression and that the optimization needs to be fixed or reverted.
>
Problem is that this is not optimization but by lack of optimization, so
it could not be easily reverted.
What Jason proposed needs change in linker and migth not work, I will
ask in gcc bug for clarification.