[PATCH] libstdc++: Fix duplicated export on basic_string::_M_disjunct on Solaris.

Tomasz Kamiński tkaminsk@redhat.com
Wed Apr 8 21:10:32 GMT 2026


The patterns for cow_string that were split to exclude starts_with,
ends_with, did not include name starting with _:
 _ZNKSs[0-9][0-9][a-z]*;
 _ZNKSbIwSt11char_traitsIwESaIwEE[0-9][0-9][a-z]*;

This was not caught on x86_64-linux as _M_disjunt was already exported
in 3.4 version (when HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT
is defined).

libstdc++-v3/ChangeLog:

	* config/abi/pre/gnu.ver (GLIBCXX_3.4): Remove _ZNKSs11_[MS]_*
	and _ZNKSbIwSt11char_traitsIwESaIwEE11_[MS]_* patterns.
---
I got the pattern wrong, because SSO string exports _M_disjunct, and
I have seen them exported in 3.4 on linux.

Tested on x86_64-linux. Rainer confirmed it fixed boostrap on Solaris.
OK for trunk?

 libstdc++-v3/config/abi/pre/gnu.ver | 2 --
 1 file changed, 2 deletions(-)

diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver
index 2ff2aa02383..624de951d41 100644
--- a/libstdc++-v3/config/abi/pre/gnu.ver
+++ b/libstdc++-v3/config/abi/pre/gnu.ver
@@ -270,7 +270,6 @@ GLIBCXX_3.4 {
     _ZNKSs[5-9][a-b]*;
     _ZNKSs[0-8][d-e]*;
     _ZNKSs[0-9][g-z]*;
-    _ZNKSs11_[MS]_*;
     _ZNKSs1[2-8][a-z]*;
     _ZNKSs[2-9][0-9][a-z]*;
     _ZNKSs4find*;
@@ -343,7 +342,6 @@ GLIBCXX_3.4 {
     _ZNKSbIwSt11char_traitsIwESaIwEE[5-9][a-b]*;
     _ZNKSbIwSt11char_traitsIwESaIwEE[0-8][d-e]*;
     _ZNKSbIwSt11char_traitsIwESaIwEE[0-9][g-z]*;
-    _ZNKSbIwSt11char_traitsIwESaIwEE11_[MS]_*;
     _ZNKSbIwSt11char_traitsIwESaIwEE1[2-8][a-z]*;
     _ZNKSbIwSt11char_traitsIwESaIwEE[2-9][0-9][a-z]*;
     _ZNKSbIwSt11char_traitsIwESaIwEE[abd-z]*;
-- 
2.53.0



More information about the Libstdc++ mailing list