From 4d2a062671e06db09d443238d2ca0cc038012f82 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Tue, 23 Jan 2018 22:41:13 +0000 Subject: [PATCH] libcxxrt: Move mangled symbols out of extern "C++" in Version.map r260553 added a number of mangled C++ symbols to Version.map inside of an existing `extern "C++"` block. ld.bfd 2.17.50 treats `extern "C++"` permissively and will match both mangled and demangled symbols against the strings in the version map block. ld.lld interprets `extern "C++"` strictly, and matches only demangled symbols. I believe lld's behaviour is correct. Contemporary versions of ld.bfd also behave as lld does, so move the mangled symbols out of the `extern "C++"` block. PR: 225128, 185663 MFC after: 1 week Sponsored by: The FreeBSD Foundation --- lib/libcxxrt/Version.map | 56 ++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/lib/libcxxrt/Version.map b/lib/libcxxrt/Version.map index cef47b9dc6a3..1276fb405b5a 100644 --- a/lib/libcxxrt/Version.map +++ b/lib/libcxxrt/Version.map @@ -112,19 +112,6 @@ CXXABI_1.3 { "typeinfo for void"; "typeinfo for wchar_t const*"; "typeinfo for wchar_t"; - # C++11 typeinfo not understood by our linker - # std::nullptr_t - _ZTIDn;_ZTIPDn;_ZTIPKDn; - # char16_t - _ZTIDi;_ZTIPDi;_ZTIPKDi; - # char32_t - _ZTIDs;_ZTIPDs;_ZTIPKDs; - # IEEE 754r decimal floating point - _ZTIDd;_ZTIPDd;_ZTIPKDd; - _ZTIDe;_ZTIPDe;_ZTIPKDe; - _ZTIDf;_ZTIPDf;_ZTIPKDf; - # IEEE 754r half-precision floating point - _ZTIDh;_ZTIPDh;_ZTIPKDh; "typeinfo for bool*"; "typeinfo for wchar_t*"; @@ -209,19 +196,6 @@ CXXABI_1.3 { "typeinfo name for void*"; "typeinfo name for unsigned int*"; "typeinfo name for float*"; - # C++11 typeinfo name not understood by our linker - # std::nullptr_t - _ZTSDn;_ZTSPDn;_ZTSPKDn; - # char16_t - _ZTSDi;_ZTSPDi;_ZTSPKDi; - # char32_t - _ZTSDs;_ZTSPDs;_ZTSPKDs; - # IEEE 754r decimal floating point - _ZTSDd;_ZTSPDd;_ZTSPKDd; - _ZTSDe;_ZTSPDe;_ZTSPKDe; - _ZTSDf;_ZTSPDf;_ZTSPKDf; - # IEEE 754r half-precision floating point - _ZTSDh;_ZTSPDh;_ZTSPKDh; "typeinfo name for __cxxabiv1::__array_type_info"; "typeinfo name for __cxxabiv1::__class_type_info"; @@ -242,10 +216,36 @@ CXXABI_1.3 { "pathscale::set_terminate(void (*)())"; "pathscale::set_unexpected(void (*)())"; "pathscale::set_use_thread_local_handlers(bool)"; - - }; + # C++11 typeinfo not understood by ld.bfd 2.17.50 + # std::nullptr_t + _ZTIDn;_ZTIPDn;_ZTIPKDn; + # char16_t + _ZTIDi;_ZTIPDi;_ZTIPKDi; + # char32_t + _ZTIDs;_ZTIPDs;_ZTIPKDs; + # IEEE 754r decimal floating point + _ZTIDd;_ZTIPDd;_ZTIPKDd; + _ZTIDe;_ZTIPDe;_ZTIPKDe; + _ZTIDf;_ZTIPDf;_ZTIPKDf; + # IEEE 754r half-precision floating point + _ZTIDh;_ZTIPDh;_ZTIPKDh; + + # C++11 typeinfo name not understood by ld.bfd 2.17.50 + # std::nullptr_t + _ZTSDn;_ZTSPDn;_ZTSPKDn; + # char16_t + _ZTSDi;_ZTSPDi;_ZTSPKDi; + # char32_t + _ZTSDs;_ZTSPDs;_ZTSPKDs; + # IEEE 754r decimal floating point + _ZTSDd;_ZTSPDd;_ZTSPKDd; + _ZTSDe;_ZTSPDe;_ZTSPKDe; + _ZTSDf;_ZTSPDf;_ZTSPKDf; + # IEEE 754r half-precision floating point + _ZTSDh;_ZTSPDh;_ZTSPKDh; + local: *; };