From 4e9989f243cd0a5d51f76e6ce98828c7cb6b9246 Mon Sep 17 00:00:00 2001 From: Ben Cheng Date: Tue, 2 Apr 2013 19:52:55 +0800 Subject: [4.8] Use default visibility for the __cxa functions in eh_arm.cc. Change-Id: I6f4b9adba43aa366c5107c8644a7a2afc840d193 --- gcc-4.8/libstdc++-v3/libsupc++/eh_arm.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gcc-4.8') diff --git a/gcc-4.8/libstdc++-v3/libsupc++/eh_arm.cc b/gcc-4.8/libstdc++-v3/libsupc++/eh_arm.cc index a91405ef4..03c157b52 100644 --- a/gcc-4.8/libstdc++-v3/libsupc++/eh_arm.cc +++ b/gcc-4.8/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 -- cgit v1.2.3