opensubscriber
   Find in this group all groups
 
Unknown more information…

u : ubuntu-devel@lists.ubuntu.com 13 June 2012 • 3:07AM -0400

Re: GCC 4.7, STL and binary compatibility of objects built with different language standards
by Steve Langasek

REPLY TO AUTHOR
 
REPLY TO GROUP




On Tue, Jun 12, 2012 at 11:24:53AM -0700, Chase Douglas wrote:
> If I understand the comment correctly, this can be distilled to:

> App calls func(), which is defined by both lib1 and lib2. lib1 and lib2
> have different ABIs. App crashes when linked in the wrong order because
> the called func() may have a different ABI than the app expects.

Not quite.  It's: app calls lib1_func(), defined only in lib1, and
lib1_func() calls cxx_helper_func(), which exists in both lib1 and lib2
with different ABIs because it's generated at compile time and is sensitive
to the standard in use.  So resolution of cxx_helper_func() either needs to
somehow be kept local to the library calling it (which is what
-Wl,-B,symbolic-functions should help with), or you can't safely mix
libraries that have different targets even if they aren't intentionally
exporting C++ interfaces.

--
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubun...                                     vorlon@debi...

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.