Patchwork libstdc++ ABI issues with __int128

login
register
mail settings
Submitter Jakub Jelinek
Date March 19, 2011, 9:19 a.m.
Message ID <20110319091904.GJ30899@tyan-ft48-01.lab.bos.redhat.com>
Download mbox | patch
Permalink /patch/87605/
State New
Headers show

Comments

Jakub Jelinek - March 19, 2011, 9:19 a.m.
On Wed, Mar 16, 2011 at 10:05:41AM -0700, Benjamin Kosnik wrote:
> 
> Here's the 4_6-branch version, approved by Jakub.

Comparing the additions in x86_64-linux libstdc++, I still see a couple of
wrong exports, in particular since gcc 4.5 the following symbols

_ZTIn@@CXXABI_1.3 OBJECT WEAK DEFAULT 16
_ZTIo@@CXXABI_1.3 OBJECT WEAK DEFAULT 16
_ZTIPKn@@CXXABI_1.3 OBJECT WEAK DEFAULT 32
_ZTIPKo@@CXXABI_1.3 OBJECT WEAK DEFAULT 32
_ZTIPn@@CXXABI_1.3 OBJECT WEAK DEFAULT 32
_ZTIPo@@CXXABI_1.3 OBJECT WEAK DEFAULT 32
_ZTSn@@CXXABI_1.3 OBJECT WEAK DEFAULT 2
_ZTSo@@CXXABI_1.3 OBJECT WEAK DEFAULT 2
_ZTSPKn@@CXXABI_1.3 OBJECT WEAK DEFAULT 4
_ZTSPKo@@CXXABI_1.3 OBJECT WEAK DEFAULT 4
_ZTSPn@@CXXABI_1.3 OBJECT WEAK DEFAULT 3
_ZTSPo@@CXXABI_1.3 OBJECT WEAK DEFAULT 3

were added.  Those surely need to go into CXXABI_1.3.5, not CXXABI_1.3,
as they weren't exported in gcc 3.4 (nor 4.5).
Plus, I believe we aren't exporting new _ZTS* symbols for some time, only
_ZTI*, right?

I'll try to post updated abilist files for
i686/x86_64/powerpc{,64}/s390{,x}-linux once this is resolved.

So here is a patch to fix that up.  Ok for trunk/4.6?

2011-03-19  Jakub Jelinek  <jakub@redhat.com>

	* config/abi/pre/gnu.ver (CXXABI_1.3): Don't export _ZT[IS][PK]*[no].
	(CXXABI_1.3.5): Export _ZTI[PK]*[no].



	Jakub
Jakub Jelinek - March 19, 2011, 9:39 a.m.
On Sat, Mar 19, 2011 at 10:19:04AM +0100, Jakub Jelinek wrote:
> On Wed, Mar 16, 2011 at 10:05:41AM -0700, Benjamin Kosnik wrote:
> > 
> > Here's the 4_6-branch version, approved by Jakub.
> 
> Comparing the additions in x86_64-linux libstdc++, I still see a couple of
> wrong exports, in particular since gcc 4.5 the following symbols
> 
> _ZTIn@@CXXABI_1.3 OBJECT WEAK DEFAULT 16
> _ZTIo@@CXXABI_1.3 OBJECT WEAK DEFAULT 16
> _ZTIPKn@@CXXABI_1.3 OBJECT WEAK DEFAULT 32
> _ZTIPKo@@CXXABI_1.3 OBJECT WEAK DEFAULT 32
> _ZTIPn@@CXXABI_1.3 OBJECT WEAK DEFAULT 32
> _ZTIPo@@CXXABI_1.3 OBJECT WEAK DEFAULT 32
> _ZTSn@@CXXABI_1.3 OBJECT WEAK DEFAULT 2
> _ZTSo@@CXXABI_1.3 OBJECT WEAK DEFAULT 2
> _ZTSPKn@@CXXABI_1.3 OBJECT WEAK DEFAULT 4
> _ZTSPKo@@CXXABI_1.3 OBJECT WEAK DEFAULT 4
> _ZTSPn@@CXXABI_1.3 OBJECT WEAK DEFAULT 3
> _ZTSPo@@CXXABI_1.3 OBJECT WEAK DEFAULT 3
> 
> were added.  Those surely need to go into CXXABI_1.3.5, not CXXABI_1.3,
> as they weren't exported in gcc 3.4 (nor 4.5).
> Plus, I believe we aren't exporting new _ZTS* symbols for some time, only
> _ZTI*, right?

And another question is, we still export a bunch of new _ZTS* symbols, isn't
that now pointless when we always do strcmp anyway?

I'm talking about
_ZTSSt16nested_exception@@CXXABI_1.3.5 OBJECT WEAK DEFAULT 21
_ZTSNSt13__future_base11_State_baseE@@GLIBCXX_3.4.15 OBJECT WEAK DEFAULT 33
_ZTSNSt13__future_base12_Result_baseE@@GLIBCXX_3.4.15 OBJECT WEAK DEFAULT 34
_ZTSSt11regex_error@@GLIBCXX_3.4.15 OBJECT WEAK DEFAULT 16
_ZTSSt12bad_weak_ptr@@GLIBCXX_3.4.15 OBJECT WEAK DEFAULT 17
_ZTSSt17bad_function_call@@GLIBCXX_3.4.15 OBJECT WEAK DEFAULT 22
here.

	Jakub

Patch

--- libstdc++-v3/config/abi/pre/gnu.ver.jj	2011-03-16 17:28:54.000000000 +0100
+++ libstdc++-v3/config/abi/pre/gnu.ver	2011-03-19 10:07:48.978884614 +0100
@@ -1337,9 +1337,9 @@  CXXABI_1.3 {
     _ZTVN10__cxxabiv121__vmi_class_type_infoE;
 
     # typeinfo structure (and some names)
-    _ZTI[a-fh-z];
-    _ZTIP[a-fh-z];
-    _ZTIPK[a-fh-z];
+    _ZTI[a-fh-mp-z];
+    _ZTIP[a-fh-mp-z];
+    _ZTIPK[a-fh-mp-z];
     _ZTIN10__cxxabiv117__array_type_infoE;
     _ZTIN10__cxxabiv117__class_type_infoE;
     _ZTIN10__cxxabiv116__enum_type_infoE;
@@ -1352,9 +1352,9 @@  CXXABI_1.3 {
     _ZTIN10__cxxabiv121__vmi_class_type_infoE;
 
     # typeinfo name
-    _ZTS[a-fh-z];
-    _ZTSP[a-fh-z];
-    _ZTSPK[a-fh-z];
+    _ZTS[a-fh-mp-z];
+    _ZTSP[a-fh-mp-z];
+    _ZTSPK[a-fh-mp-z];
     _ZTSN10__cxxabiv117__array_type_infoE;
     _ZTSN10__cxxabiv117__class_type_infoE;
     _ZTSN10__cxxabiv116__enum_type_infoE;
@@ -1435,6 +1435,11 @@  CXXABI_1.3.5 {
     _ZTIPDn;
     _ZTIPKDn;
 
+    # typeinfo for __int128 and unsigned __int128
+    _ZTI[no];
+    _ZTIP[no];
+    _ZTIPK[no];
+
     # Default function.
     _ZSt11_Hash_bytesPKv*;