This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Duplicate data objects in shared libraries
From: "Jason Merrill" <jason@redhat.com>
To: "H . J . Lu" <hjl@lucon.org>
> > both A.so and B.so should resolve to C.so, I think it makes sense.
>
> Yes, that is what I was saying. A possible refinement would be
>
> 6) #5, but if the definition in the RTLD_LOCAL object is strong, use it
in
> the object.
>
> Which would produce the current Linux semantics described above if the
> definitions in A.so and B.so are strong, and the current Solaris
semantics
> described above if they are weak. This would allow a plugin writer to
> override operator new for their plugin without affecting uses in
> libstdc++. Obviously, the plugin writer would need to be careful to
> handle all of their own memory allocation/deallocation.
That's a common model for plugins; it would be very useful if we could
support it.