This is the mail archive of the
mailing list for the GCC project.
Re: Duplicate data objects in shared libraries
From: "Jason Merrill" <email@example.com>
To: "H . J . Lu" <firstname.lastname@example.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
> 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
> 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