This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: LSB patch to gcc 3.3 tree


Michael Matz:
> Hi,
>
> On Mon, 28 Jun 2004, Gabriel Dos Reis wrote:
>
>> > Gaby said "It is the patch that exposes the necessary symbols, already
>> > applied to gcc-3_4-branch.   Therefore, my approval is a "line-up"."
>> >
>> > Information on this is available at:
>> http://www.linuxbase.org/~anderson/
>> > You can obtain the patch by clicking on the link titled "C++ ABI Test
>> > tool".
>> >
>> > I've cc'd Stuart so he will know this has been done and can also be
>> > reached to respond to and technical questions the list may have.
>>
>> Thanks for doing this.  The patch in question is in the
>> README file.  I copy-and-paste it here for completeness.
>
> Or, if someone wants to see an applyable and tested patch (for 3.3
> branch), it's below.  The only question I think is if those are the right
> symversions.  Such patch can't have been applied to 3.4 (as LSB people
> seem to think) as 3.4 uses completely different symversions (GLIBCXX_3.4
> instead GLIBCPP_3*, and CXXABI_1.3 (no 1.2 inheritance) instead
> CXXABI_1.2).
>
>
> Ciao,
> Michael.
> --
> --- libstdc++-v3/config/linker-map.gnu
> +++ libstdc++-v3/config/linker-map.gnu
> @@ -399,6 +399,12 @@
>
>    _ZNSt9basic_iosI[cw]St11char_traitsI[cw]EE11_M_setstateESt12_Ios_Iostate;
>
> +  # For LSB 2.0
> +  # std::__ctype_abstract_base*
> +  _ZNSt21__ctype_abstract_base*;
> +  # std::__codecvt_abstract_base*
> +  _ZNSt23__codecvt_abstract_base*;
> +
>  } GLIBCPP_3.2.3;
>
>  # Symbols in the support library (libsupc++) have their own tag.
> @@ -468,3 +474,9 @@
>      __cxa_guard_abort;
>
>  } CXXABI_1.2;
> +
> +CXXABI_1.2.2 {
> +   _ZN10__cxxabiv1*;
> +   _ZNK10__cxxabiv1*;
> +   _ZN9__gnu_cxx*;
> +} CXXABI_1.2.1;
>

>From the gcc-3_4-branch, I see that libstdc++-v3/config/linker-map.gnu
exports a huge number of symbols for GLIBCXX_3.4.
In particular, as far as LSB is concerned, it exports
* for vtables:

    _ZTVSt23__codecvt_abstract_baseI[cw]c11__mbstate_tE;
    _ZTVSt21__ctype_abstract_baseI[cw]E;

* for typeinfo structures

    _ZTISt21__ctype_abstract_baseI[cw]E;
    _ZTISt23__codecvt_abstract_baseI[cw]c11__mbstate_tE;

* for typeinfo names:

    _ZTSSt21__ctype_abstract_baseI[cw]E;
    _ZTSSt23__codecvt_abstract_baseI[cw]c11__mbstate_tE;

* regular entities

    # std::__codecvt_abstract_base*
    _ZNStSt23__codecvt_abstract_base*;

So, while std::__codecvt_abstract_base* is exported, no such
thing happens for std::__ctype_abstract_base.

----> LSB people, we can't export those symbols for 3.3.x if
they have not been already exported in 3.4.x.  What is up?


As for the support library, the exported symbols _ZN10__cxxabiv1*
are precisely (for CXXABI_1.3):

    # *_type_info classes, ctor and dtor
    _ZN10__cxxabiv117__array_type_info*;
    _ZN10__cxxabiv117__class_type_info*;
    _ZN10__cxxabiv116__enum_type_info*;
    _ZN10__cxxabiv120__function_type_info*;
    _ZN10__cxxabiv123__fundamental_type_info*;
    _ZN10__cxxabiv117__pbase_type_info*;
    _ZN10__cxxabiv129__pointer_to_member_type_info*;
    _ZN10__cxxabiv119__pointer_type_info*;
    _ZN10__cxxabiv120__si_class_type_info*;
    _ZN10__cxxabiv121__vmi_class_type_info*;

GCC-3.3.x can line up to those symbols, but no more.
Similarly, the _ZNK10__cxxabiv1* symbols are:

    # *_type_info classes, member functions
    _ZNK10__cxxabiv117__class_type_info*;
    _ZNK10__cxxabiv120__function_type_info*;
    _ZNK10__cxxabiv117__pbase_type_info*;
    _ZNK10__cxxabiv129__pointer_to_member_type_info*;
    _ZNK10__cxxabiv119__pointer_type_info*;
    _ZNK10__cxxabiv120__si_class_type_info*;
    _ZNK10__cxxabiv121__vmi_class_type_info*;

GCC-3.3.x can line up to those, but no more.

Finally, for _ZN9__gnu_cxx, we have only one symbol for CXXABI_1.3:

    # __gnu_cxx::_verbose_terminate_handler()
    _ZN9__gnu_cxx27__verbose_terminate_handlerEv;


That is it.

---> LSB people: could tell me whether, exporting those symbols
resolve the issues for you?  There is no way to go beyond as
it introduces an API incompatibility with GCC-3.4.x -- which seems
to be already working for you.

Thanks,

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]