diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 67fbed7e274..a16e62ce002 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2003-03-04 Benjamin Kosnik + + * src/globals.cc: Clarify comments, remove c_locale_imp_compat. + + * config/linker-map.gnu: Filter typeinfo and vtable info. + 2003-03-04 Jerry Quinn * src/ios.cc (ios_base::_M_grow_words): Don't delete _M_word on diff --git a/libstdc++-v3/config/linker-map.gnu b/libstdc++-v3/config/linker-map.gnu index b1405e30ce8..5011619c53a 100644 --- a/libstdc++-v3/config/linker-map.gnu +++ b/libstdc++-v3/config/linker-map.gnu @@ -130,12 +130,48 @@ GLIBCPP_3.4 { _ZdaPvRKSt9nothrow_t; # vtable - _ZTV*; - _ZTT*; + _ZTVN9__gnu_cxx*; + _ZTVNSt8ios_base7failureE; + _ZTVNSt6locale5facetE; + _ZTVS[a-z]; + _ZTVSt[0-9][A-Za-z]*; + _ZTVSt[0-9][0-9][A-Za-z]*; + _ZTVSt11__timepunctI[cw]E; + _ZTVSt23__codecvt_abstract_baseI[cw]c11__mbstate_tE; + _ZTVSt21__ctype_abstract_baseI[cw]E; + + _ZTTS[a-z]; + _ZTTSt[0-9][A-Za-z]*; + _ZTTSt[0-9][0-9][A-Za-z]*; # typeinfo - _ZTI*; - _ZTS*; + _ZTI[a-z]; + _ZTINSt8ios_base7failureE; + _ZTINSt6locale5facetE; + _ZTIN9__gnu_cxx*; + _ZTIP[a-z]; + _ZTIPK[a-z]; + _ZTIS[a-z]; + _ZTISt[0-9][A-Za-z]*; + _ZTISt[0-9][0-9][A-Za-z]*; + _ZTISt11__timepunctI[cw]E; + _ZTISt10__num_base; + _ZTISt21__ctype_abstract_baseI[cw]E; + _ZTISt23__codecvt_abstract_baseI[cw]c11__mbstate_tE; + + _ZTS[a-z]; + _ZTSNSt8ios_base7failureE; + _ZTSNSt6locale5facetE; + _ZTSN9__gnu_cxx*; + _ZTSP[a-z]; + _ZTSPK[a-z]; + _ZTSS[a-z]; + _ZTSSt[0-9][A-Za-z]*; + _ZTSSt[0-9][0-9][A-Za-z]*; + _ZTSSt11__timepunctI[cw]E; + _ZTSSt10__num_base; + _ZTSSt21__ctype_abstract_baseI[cw]E; + _ZTSSt23__codecvt_abstract_baseI[cw]c11__mbstate_tE; # function-scope static objects requires a guard variable. _ZGV*; @@ -225,6 +261,13 @@ CXXABI_1.3 { # __gnu_cxx::_verbose_terminate_handler() _ZN9__gnu_cxx27__verbose_terminate_handlerEv; + # typeinfo + _ZTIN10__cxxabi*; + _ZTSN10__cxxabi*; + + # vtable + _ZTVN10__cxxabi*; + local: *; }; diff --git a/libstdc++-v3/src/globals.cc b/libstdc++-v3/src/globals.cc index 7d4949c5188..0f8dfefbd0b 100644 --- a/libstdc++-v3/src/globals.cc +++ b/libstdc++-v3/src/globals.cc @@ -41,13 +41,60 @@ // time. This file contains definitions of all global variables that // require initialization as arrays of characters. -// Because declares the standard streams to be [io]stream -// types instead of say [io]fstream types, it is also necessary to -// allocate the actual file buffers in this file. +// NB: asm directives can rename these non-exported, namespace +// __gnu_cxx symbols into exported, namespace std symbols with the +// appropriate symbol version name. +// The rename syntax is +// asm (".symver currentname,oldname@@GLIBCPP_3.2") +// In macro form: +// _GLIBCPP_ASM_SYMVER(currentname, oldname, GLIBCPP_3.2) + +namespace std +{ + // Standard stream objects. + // NB: Iff is included, these definitions become wonky. + typedef char fake_istream[sizeof(istream)] + __attribute__ ((aligned(__alignof__(istream)))); + typedef char fake_ostream[sizeof(ostream)] + __attribute__ ((aligned(__alignof__(ostream)))); + fake_istream cin; + fake_ostream cout; + fake_ostream cerr; + fake_ostream clog; + +#ifdef _GLIBCPP_USE_WCHAR_T + typedef char fake_wistream[sizeof(wistream)] + __attribute__ ((aligned(__alignof__(wistream)))); + typedef char fake_wostream[sizeof(wostream)] + __attribute__ ((aligned(__alignof__(wostream)))); + fake_wistream wcin; + fake_wostream wcout; + fake_wostream wcerr; + fake_wostream wclog; +#endif +} // namespace std + namespace __gnu_cxx { using namespace std; + // Because declares the standard streams to be [io]stream + // types instead of say [io]fstream types, it is also necessary to + // allocate the actual file buffers in this file. + typedef char fake_filebuf[sizeof(stdio_filebuf)] + __attribute__ ((aligned(__alignof__(stdio_filebuf)))); + fake_filebuf buf_cout; + fake_filebuf buf_cin; + fake_filebuf buf_cerr; + +#ifdef _GLIBCPP_USE_WCHAR_T + typedef char fake_wfilebuf[sizeof(stdio_filebuf)] + __attribute__ ((aligned(__alignof__(stdio_filebuf)))); + fake_wfilebuf buf_wcout; + fake_wfilebuf buf_wcin; + fake_wfilebuf buf_wcerr; +#endif + typedef char fake_facet_name[sizeof(char*)] __attribute__ ((aligned(__alignof__(char*)))); fake_facet_name facet_name[6 + _GLIBCPP_NUM_CATEGORIES]; @@ -56,27 +103,10 @@ namespace __gnu_cxx __attribute__ ((aligned(__alignof__(locale::_Impl)))); fake_locale_Impl c_locale_impl; - - // NB: The asm directives renames these non-exported, namespace - // __gnu_cxx symbols into the mistakenly exported, namespace std - // symbols in GLIBCPP_3.2. - // The rename syntax is - // asm (".symver currentname,oldname@@GLIBCPP_3.2") - // At the same time, these new __gnu_cxx symbols are not exported. - // In the future, GLIBCXX_ABI > 5 should remove all uses of - // _GLIBCPP_ASM_SYMVER in this file. typedef char fake_locale[sizeof(locale)] __attribute__ ((aligned(__alignof__(locale)))); fake_locale c_locale; - // GLIBCXX_ABI > 5 will not need this symbol at all. - // It's here just as a placeholder, as the size of this exported - // object changed. The new symbol is not exported. - const int o = sizeof(locale::_Impl) - sizeof(char*[_GLIBCPP_NUM_CATEGORIES]); - typedef char fake_locale_Impl_compat[o] - __attribute__ ((aligned(__alignof__(o)))); - fake_locale_Impl_compat c_locale_impl_compat; - typedef char fake_facet_vec[sizeof(locale::facet*)] __attribute__ ((aligned(__alignof__(locale::facet*)))); fake_facet_vec facet_vec[_GLIBCPP_NUM_FACETS]; @@ -189,20 +219,6 @@ namespace __gnu_cxx fake_messages_w messages_w; #endif - typedef char fake_filebuf[sizeof(stdio_filebuf)] - __attribute__ ((aligned(__alignof__(stdio_filebuf)))); - fake_filebuf buf_cout; - fake_filebuf buf_cin; - fake_filebuf buf_cerr; - -#ifdef _GLIBCPP_USE_WCHAR_T - typedef char fake_wfilebuf[sizeof(stdio_filebuf)] - __attribute__ ((aligned(__alignof__(stdio_filebuf)))); - fake_wfilebuf buf_wcout; - fake_wfilebuf buf_wcin; - fake_wfilebuf buf_wcerr; -#endif - // Globals for once-only runtime initialization of mutex objects. This // allows static initialization of these objects on systems that need a // function call to initialize a mutex. For example, see stl_threads.h. @@ -226,27 +242,3 @@ namespace __gnu_cxx { __GTHREAD_MUTEX_INIT_FUNCTION (_GLIBCPP_mutex_address); } #endif } // namespace __gnu_cxx - -namespace std -{ - // Standard stream objects. - typedef char fake_istream[sizeof(istream)] - __attribute__ ((aligned(__alignof__(istream)))); - typedef char fake_ostream[sizeof(ostream)] - __attribute__ ((aligned(__alignof__(ostream)))); - fake_istream cin; - fake_ostream cout; - fake_ostream cerr; - fake_ostream clog; - -#ifdef _GLIBCPP_USE_WCHAR_T - typedef char fake_wistream[sizeof(wistream)] - __attribute__ ((aligned(__alignof__(wistream)))); - typedef char fake_wostream[sizeof(wostream)] - __attribute__ ((aligned(__alignof__(wostream)))); - fake_wistream wcin; - fake_wostream wcout; - fake_wostream wcerr; - fake_wostream wclog; -#endif -} // namespace std