From b733003324eb82aa8af309b496856fba51a4373d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pawe=C5=82=20Sikora?= Date: Mon, 31 Oct 2005 20:07:32 +0000 Subject: [PATCH] - the first step to fix -fvisibility feature. Changed files: gcc-pr19664_gnu_internal.patch -> 1.1 --- gcc-pr19664_gnu_internal.patch | 256 +++++++++++++++++++++++++++++++++ 1 file changed, 256 insertions(+) create mode 100644 gcc-pr19664_gnu_internal.patch diff --git a/gcc-pr19664_gnu_internal.patch b/gcc-pr19664_gnu_internal.patch new file mode 100644 index 0000000..c42438e --- /dev/null +++ b/gcc-pr19664_gnu_internal.patch @@ -0,0 +1,256 @@ +2005-10-31 Benjamin Kosnik + + * src/mt_allocator.cc (__gnu_internal): Make hidden. + * src/pool_allocator.cc: Same. + * src/locale_init.cc (__gnu_internal): Same. + * src/locale.cc (__gnu_internal): Same. + * src/ios_init.cc (__gnu_internal): Same. + * src/globals_io.cc: Same. + * src/globals_locale.cc (__gnu_internal): Same. + * src/debug.cc (__gnu_internal): Same. + * src/ext-inst.cc (__gnu_internal): Same. + +*** gcc/libstdc++-v3/src/debug.cc 9 Sep 2005 10:14:33 -0000 1.15 +--- gcc/libstdc++-v3/src/debug.cc 28 Oct 2005 00:44:54 -0000 +*************** using namespace std; +*** 41,47 **** +--- 41,51 ---- + + namespace __gnu_internal + { ++ #pragma GCC visibility push(hidden) ++ + static __glibcxx_mutex_define_initialized(iterator_base_mutex); ++ ++ #pragma GCC visibility pop + } // namespace __gnu_internal + + namespace __gnu_debug +*** gcc/libstdc++-v3/src/ext-inst.cc 17 Aug 2005 02:14:21 -0000 1.8 +--- gcc/libstdc++-v3/src/ext-inst.cc 28 Oct 2005 00:44:54 -0000 +*************** +*** 1,6 **** + // Explicit instantiation file. + +! // Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. + // + // This file is part of the GNU ISO C++ Library. This library is free + // software; you can redistribute it and/or modify it under the +--- 1,6 ---- + // Explicit instantiation file. + +! // Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc. + // + // This file is part of the GNU ISO C++ Library. This library is free + // software; you can redistribute it and/or modify it under the +*************** +*** 36,42 **** +--- 36,46 ---- + + namespace __gnu_internal + { ++ #pragma GCC visibility push(hidden) ++ + const int min_len = __gnu_cxx::_Rope_constants::_S_max_rope_depth + 1; ++ ++ #pragma GCC visibility pop + } + + namespace __gnu_cxx +*** gcc/libstdc++-v3/src/globals_io.cc 17 Aug 2005 02:14:22 -0000 1.3 +--- gcc/libstdc++-v3/src/globals_io.cc 28 Oct 2005 00:44:54 -0000 +*************** +*** 1,4 **** +! // Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + // + // This file is part of the GNU ISO C++ Library. This library is free + // software; you can redistribute it and/or modify it under the +--- 1,4 ---- +! // Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + // + // This file is part of the GNU ISO C++ Library. This library is free + // software; you can redistribute it and/or modify it under the +*************** namespace std +*** 76,81 **** +--- 76,83 ---- + + namespace __gnu_internal + { ++ #pragma GCC visibility push(hidden) ++ + using namespace std; + using namespace __gnu_cxx; + +*************** namespace __gnu_internal +*** 126,129 **** +--- 128,133 ---- + _GLIBCXX_mutex_address_init () + { __GTHREAD_MUTEX_INIT_FUNCTION (_GLIBCXX_mutex_address); } + #endif ++ ++ #pragma GCC visibility pop + } // namespace __gnu_internal +*** gcc/libstdc++-v3/src/globals_locale.cc 17 Aug 2005 02:14:22 -0000 1.4 +--- gcc/libstdc++-v3/src/globals_locale.cc 28 Oct 2005 00:44:54 -0000 +*************** +*** 1,4 **** +! // Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + // + // This file is part of the GNU ISO C++ Library. This library is free + // software; you can redistribute it and/or modify it under the +--- 1,4 ---- +! // Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + // + // This file is part of the GNU ISO C++ Library. This library is free + // software; you can redistribute it and/or modify it under the +*************** +*** 45,50 **** +--- 45,52 ---- + + namespace __gnu_internal + { ++ #pragma GCC visibility push(hidden) ++ + using namespace std; + + typedef char fake_locale_Impl[sizeof(locale::_Impl)] +*************** namespace __gnu_internal +*** 207,210 **** +--- 209,214 ---- + __attribute__ ((aligned(__alignof__(std::__timepunct_cache)))); + fake_time_cache_w timepunct_cache_w; + #endif ++ ++ #pragma GCC visibility pop + } // namespace __gnu_internal +*** gcc/libstdc++-v3/src/ios_init.cc 17 Aug 2005 02:14:22 -0000 1.8 +--- gcc/libstdc++-v3/src/ios_init.cc 28 Oct 2005 00:44:54 -0000 +*************** +*** 1,6 **** + // Iostreams base classes -*- C++ -*- + +! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 + // Free Software Foundation, Inc. + // + // This file is part of the GNU ISO C++ Library. This library is free +--- 1,6 ---- + // Iostreams base classes -*- C++ -*- + +! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 + // Free Software Foundation, Inc. + // + // This file is part of the GNU ISO C++ Library. This library is free +*************** +*** 42,47 **** +--- 42,49 ---- + + namespace __gnu_internal + { ++ #pragma GCC visibility push(hidden) ++ + using namespace __gnu_cxx; + + // Extern declarations for global objects in src/globals.cc. +*************** namespace __gnu_internal +*** 62,67 **** +--- 64,71 ---- + extern stdio_filebuf buf_wcin; + extern stdio_filebuf buf_wcerr; + #endif ++ ++ #pragma GCC visibility pop + } // namespace __gnu_internal + + namespace std +*** gcc/libstdc++-v3/src/locale.cc 11 Oct 2005 06:19:13 -0000 1.112 +--- gcc/libstdc++-v3/src/locale.cc 28 Oct 2005 00:44:54 -0000 +*************** +*** 1,4 **** +! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 + // Free Software Foundation, Inc. + // + // This file is part of the GNU ISO C++ Library. This library is free +--- 1,4 ---- +! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 + // Free Software Foundation, Inc. + // + // This file is part of the GNU ISO C++ Library. This library is free +*************** +*** 37,44 **** +--- 37,48 ---- + + namespace __gnu_internal + { ++ #pragma GCC visibility push(hidden) ++ + // Mutex object for cache access + static __glibcxx_mutex_define_initialized(locale_cache_mutex); ++ ++ #pragma GCC visibility pop + } + + namespace std +*** gcc/libstdc++-v3/src/locale_init.cc 9 Sep 2005 10:14:34 -0000 1.17 +--- gcc/libstdc++-v3/src/locale_init.cc 28 Oct 2005 00:44:54 -0000 +*************** +*** 37,42 **** +--- 37,44 ---- + + namespace __gnu_internal + { ++ #pragma GCC visibility push(hidden) ++ + // Defined in globals.cc. + extern std::locale c_locale; + extern std::locale::_Impl c_locale_impl; +*************** namespace __gnu_internal +*** 91,96 **** +--- 93,100 ---- + + // Mutex object for locale initialization. + static __glibcxx_mutex_define_initialized(locale_mutex); ++ ++ #pragma GCC visibility pop + } // namespace __gnu_internal + + namespace std +*** gcc/libstdc++-v3/src/mt_allocator.cc 12 Sep 2005 04:49:10 -0000 1.13 +--- gcc/libstdc++-v3/src/mt_allocator.cc 28 Oct 2005 00:44:54 -0000 +*************** +*** 37,42 **** +--- 37,44 ---- + + namespace __gnu_internal + { ++ #pragma GCC visibility push(hidden) ++ + #ifdef __GTHREADS + struct __freelist + { +*************** namespace __gnu_internal +*** 74,79 **** +--- 76,83 ---- + freelist._M_thread_freelist = __tr; + } + #endif ++ ++ #pragma GCC visibility pop + } + + namespace __gnu_cxx +*** gcc/libstdc++-v3/src/pool_allocator.cc 9 Sep 2005 10:14:34 -0000 1.6 +--- gcc/libstdc++-v3/src/pool_allocator.cc 28 Oct 2005 00:44:54 -0000 +*************** +*** 37,43 **** +--- 37,47 ---- + + namespace __gnu_internal + { ++ #pragma GCC visibility push(hidden) ++ + static __glibcxx_mutex_define_initialized(palloc_init_mutex); ++ ++ #pragma GCC visibility pop + } + + namespace __gnu_cxx -- 2.43.0