https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81806

--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Xi Ruoyao from comment #7)
> Oh I didn't expect an ABI breakage.  I thought "pb_ds is a source code
> library so there is no ABI in libstdc++.so".  Now I understand that we
> should not break old third-party libraries compiled with the old pb_ds
> headers (is there any? :)

The libstdc++ ABI is larger than the set of symbols exported from libstdc++.so

std::vector is defined entirely in headers, not exported from libstdc++.so, but
we can't just change its layout. That would make it impossible to link objects
compiled with different versions of GCC because they would disagree on the
layout of std::vector.

So this isn't about third-party libraries, it's about all code that uses pb_ds.
If you compile foo.o with one version of GCC and bar.o with another version of
GCC, then you should be able to link them together.

Reply via email to