aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/libstdc++-v3
diff options
context:
space:
mode:
authorBen Cheng <bccheng@google.com>2014-04-14 20:26:44 -0700
committerAndrew Hsieh <andrewhsieh@google.com>2014-04-22 16:15:33 -0700
commit42bf51abe03e8701b12b3c0ecba898d0f7fe625d (patch)
tree346542583df6aa08ef8746b5739b98e298bccfca /gcc-4.9/libstdc++-v3
parent13c4c9692f117e7aef9b5aa58fd8cf452d84f164 (diff)
downloadtoolchain_gcc-42bf51abe03e8701b12b3c0ecba898d0f7fe625d.tar.gz
toolchain_gcc-42bf51abe03e8701b12b3c0ecba898d0f7fe625d.tar.bz2
toolchain_gcc-42bf51abe03e8701b12b3c0ecba898d0f7fe625d.zip
[4.9] Use default visibility for the __cxa functions in eh_arm.cc.
See 4e9989f243cd0a5d51f76e6ce98828c7cb6b9246 Change-Id: Icd8571e9e23b5dd23ae52db71019ecc4b5deb8e3
Diffstat (limited to 'gcc-4.9/libstdc++-v3')
-rw-r--r--gcc-4.9/libstdc++-v3/libsupc++/eh_arm.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc-4.9/libstdc++-v3/libsupc++/eh_arm.cc b/gcc-4.9/libstdc++-v3/libsupc++/eh_arm.cc
index aa453dddd..859a7138a 100644
--- a/gcc-4.9/libstdc++-v3/libsupc++/eh_arm.cc
+++ b/gcc-4.9/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, exception object UE_HEADER and a
// type CATCH_TYPE to compare against, return whether or not there is
@@ -224,4 +234,6 @@ asm (" .pushsection .text.__cxa_end_cleanup\n"
#endif
#endif
+#pragma GCC visibility pop
+
#endif