path: root/gcc-4.4.3/libstdc++-v3
diff options
authorAndrew Hsieh <andrewhsieh@google.com>2013-03-06 18:30:47 +0800
committerAndrew Hsieh <andrewhsieh@google.com>2013-03-06 18:30:47 +0800
commitadbc2ae995cc63baadd9bb729196c6b6b3596296 (patch)
tree3f77d5baacede2266c9cf37747b027721170381e /gcc-4.4.3/libstdc++-v3
parenta60e0bf91066f5cb541494065cc08967fc4d9dbd (diff)
GCC4.6/4.4.3: Use default visibility for the __cxa functions in eh_arm.cc
See related: 811925038a83c20dad6250957e3082e1039c0c77 Change-Id: Ibafc1a0d77bee2340c5279c4c90f5046b1080425
Diffstat (limited to 'gcc-4.4.3/libstdc++-v3')
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc-4.4.3/libstdc++-v3/libsupc++/eh_arm.cc b/gcc-4.4.3/libstdc++-v3/libsupc++/eh_arm.cc
index 58997cc17..1ce63bd7a 100644
--- a/gcc-4.4.3/libstdc++-v3/libsupc++/eh_arm.cc
+++ b/gcc-4.4.3/libstdc++-v3/libsupc++/eh_arm.cc
@@ -29,6 +29,16 @@
using namespace __cxxabiv1;
+// The GCC command-line option "-fvisibility=hidden" apparently fails to hide
+// the visibility of the inline assembly function "__cxa_end_cleanup".
+// We need to keep the visibility of the __cxa_* functions coherent otherwise
+// linking eh_arm.o to resolve __cxa_end_cleanup (eg needed by -frtti
+// -fexceptions) will disappoint the linker by exposing __cxa_type_match and
+// __cxa_begin_cleanup (eg needed by __aeabi_idiv from libgcc.a).
+// Therefore as a simple workaround we just force the visibility to default for
+// all these __cxa functions in this module.
+#pragma GCC visibility push(default)
// Given the thrown type THROW_TYPE, pointer to a variable containing a
// pointer to the exception object THROWN_PTR_P and a type CATCH_TYPE to
@@ -175,4 +185,6 @@ asm (".global __cxa_end_cleanup\n"
" bl\t_Unwind_Resume @ Never returns\n");
+#pragma GCC visibility pop