This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: PATCH: Support Sun symbol versioning in libstdc++-v3
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- Cc: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Wed, 24 Feb 2010 16:20:30 +0100
- Subject: Re: PATCH: Support Sun symbol versioning in libstdc++-v3
- References: <yddocjek7pg.fsf@CeBiTec.Uni-Bielefeld.DE>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Feb 24, 2010 at 03:51:39PM +0100, Rainer Orth wrote:
> * config/abi/pre/gnu.ver (GLIBCXX_3.4.5): Remove duplicates.
> (GLIBCXX_3.4.6): Likewise.
This is a serious ABI change. Those symbols were mistakenly exported
in GLIBCXX_3.4 version, then fixed up to use a version in which they were
actually introduced, but in the wild there are programs using both
symbol versions for those symbols. .symver directive is used to alias
the same internal symbol into both symbol versions (but in theory and e.g.
glibc uses it heavily two different implementations of some routine, one
exported say as foo@GLIBC_2.0 and another as foo@@GLIBC_2.6). This is
something Sun symbol versioning scheme (which is much more limitated than
the GNU symbol versioning scheme) doesn't handle, but you definitely can't
break ABI compatibility on Linux and other targets because of it.
Your script to create Sun versioning script needs simply to cope with it
somehow.
> --- a/libstdc++-v3/config/abi/pre/gnu.ver Fri Feb 19 10:00:04 2010 +0100
> +++ b/libstdc++-v3/config/abi/pre/gnu.ver Tue Feb 23 23:26:18 2010 +0100
> @@ -721,33 +721,6 @@
> copysignf;
>
> # GLIBCXX_ABI compatibility only.
> - # std::string
> - _ZNKSs11_M_disjunctEPKc;
> - _ZNKSs15_M_check_lengthE[jmy][jmy]PKc;
> - _ZNSs4_Rep26_M_set_length_and_sharableE*;
> - _ZNSs7_M_copyEPcPKc[jmy];
> - _ZNSs7_M_moveEPcPKc[jmy];
> - _ZNSs9_M_assignEPc[jmy]c;
> -
> - # std::wstring
> - _ZNKSbIwSt11char_traitsIwESaIwEE11_M_disjunctEPKw;
> - _ZNKSbIwSt11char_traitsIwESaIwEE15_M_check_lengthE[jmy][jmy]PKc;
> - _ZNSbIwSt11char_traitsIwESaIwEE4_Rep26_M_set_length_and_sharableE*;
> - _ZNSbIwSt11char_traitsIwESaIwEE7_M_copyEPwPKw[jmy];
> - _ZNSbIwSt11char_traitsIwESaIwEE7_M_moveEPwPKw[jmy];
> - _ZNSbIwSt11char_traitsIwESaIwEE9_M_assignEPw[jmy]w;
> -
> - _ZNKSt13basic_fstreamI[cw]St11char_traitsI[cw]EE7is_openEv;
> - _ZNKSt14basic_ifstreamI[cw]St11char_traitsI[cw]EE7is_openEv;
> - _ZNKSt14basic_ofstreamI[cw]St11char_traitsI[cw]EE7is_openEv;
> -
> - _ZNSi6ignoreE[ilvx];
> - _ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreE[ilvx];
> -
> - _ZNSt11char_traitsI[cw]E2eqERK[cw]S2_;
> -
> - _ZNSt19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEppEv;
> -
> # std::locale::Impl _M_ members
> _ZNSt6locale5_Impl16_M_install_facetEPKNS_2idEPKNS_5facetE;
> _ZNSt6locale5_Impl16_M_replace_facetEPKS0_PKNS_2idE;
> @@ -855,8 +828,6 @@
>
> _ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EE9showmanycEv;
>
> - _ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv;
> -
> _ZN9__gnu_cxx6__poolILb1EE13_M_initializeEv;
>
> } GLIBCXX_3.4.5;
Jakub