From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by sourceware.org (Postfix) with ESMTPS id B9CB939BEC2B; Mon, 2 Nov 2020 20:52:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B9CB939BEC2B Received: by mail-wm1-x344.google.com with SMTP id c16so10790352wmd.2; Mon, 02 Nov 2020 12:52:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=+xFHZ36zGQYLGYCccdREoqL1J/f61MVzyZv6W/p9fgA=; b=RQbOjge6KkBq1jl0r2FucsLunBbg4TG0MN0ZSvcBwO1mW89PhC2hPZn7kx+BQr++WU k4rD8RZFzfy/zFNAbfT+z/lW61RHNoiYwWs76+t7JA6nVvpCtJGoJ3xBY/q0BLrLUTgj tEhp6ltfDGgMYB27tfhqA77NcTH0agpK0JTUqj4CJAIGBOgwJgeN3sIXn7kgh96INf7A RFcMGJddXH/jO4dGkyacqT4BGawoyWR4V6B9/HWX1ejpXSF5+6OdnG4RTGmw15CxHnOp fcG1Dn6KqYVbedgrlSiRFG6qELZ0GrbE/Kve08dq0/nhw9kT+33KCOd+y/OMi2WdqBXZ BOsg== X-Gm-Message-State: AOAM531R7sSz2xLnNocMg0GXRkJJTOv/Cv0AN9XJzAormRcknESULBJB /wjVKs1GIAIxPsVFXrwOvX7qV89kuI0= X-Google-Smtp-Source: ABdhPJzFGGiXx2RgvPXSLwV6j3PvS5Kpg0hgEx0IcZAN0Zeh/zzFh2dYs7CxQb+4LP28JExpiLkPog== X-Received: by 2002:a1c:b70b:: with SMTP id h11mr16095064wmf.185.1604350358638; Mon, 02 Nov 2020 12:52:38 -0800 (PST) Received: from ?IPv6:2a01:e0a:1dc:b1c0:3de5:afd:57a8:c1e9? ([2a01:e0a:1dc:b1c0:3de5:afd:57a8:c1e9]) by smtp.googlemail.com with ESMTPSA id j13sm24220978wru.86.2020.11.02.12.52.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Nov 2020 12:52:37 -0800 (PST) Subject: Re: [PATCH] Add missing gnu-versioned-namespace symbols To: Jonathan Wakely Cc: "libstdc++@gcc.gnu.org" , gcc-patches References: <20201102141735.GS503596@redhat.com> From: =?UTF-8?Q?Fran=c3=a7ois_Dumont?= Message-ID: <9c81c091-497e-2e36-a855-ce88fc91fdf9@gmail.com> Date: Mon, 2 Nov 2020 21:52:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201102141735.GS503596@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: fr X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2020 20:52:42 -0000 On 02/11/20 3:17 pm, Jonathan Wakely wrote: > On 01/11/20 20:48 +0100, François Dumont via Libstdc++ wrote: >> Several tests are failing because of those missing symbols. >> >> I understand why we need to export symbols relying in the versioned >> namespace but I don't understand why we need to do it for >> _GLIBCXX_DEBUG symbols which are not version namespace dependant. > > If you don't export the symbol, it can't be found by code linking to > libstdc++.so.8 So I understand that in versioned namespace mode only gnu-versioned-namespace.ver is being used and not gnu.ver. > > This linker script is the only one used to build libstdc++.so.8 so all > symbols that need to be exported by that library have to be exported > by this script. Nothing exports that debug symbol unless you add it > here. > > What I don't understand is why the __istream_extract symbol isn't > matched by the wildcard in the extern "C++" block at the top of the > file. Maybe for the same reason that the std::__copy_streambufs before this one and some others symbols in std::__8 had to be explicitely exported too. But I don't know it. > >> Do you want to backport the Debug symbol ? >> >>     libstdc++: Add mising gnu-versioned-namespace symbols >> >>     libstdc++-v3/ChangeLog: >> >>             * config/abi/pre/gnu-versioned-namespace.ver: >>             Add __istream_extract and >> _Safe_local_iterator_base::_M_attach_single >>             symbols. >> >> Tested under Linux x86_64 versioned namespace. >> >> Ok to commit ? >> >> François >> > >> diff --git a/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver >> b/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver >> index 0965854fbc3..3b6d7944d06 100644 >> --- a/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver >> +++ b/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver >> @@ -98,6 +98,9 @@ GLIBCXX_8.0 { >>     _ZNSt3__817__copy_streambufsI*; >>     _ZNSt3__821__copy_streambufs_eofI*; >> >> +    # std::__istream_extract(wistream&, wchar_t*, streamsize) >> + >> _ZNSt3__817__istream_extractIwNS_11char_traitsIwEEEEvRNS_13basic_istreamIT_T0_EEPS4_[ilx]; >> + >>     # __gnu_cxx::__atomic_add >>     # __gnu_cxx::__exchange_and_add >>     _ZN9__gnu_cxx3__812__atomic_addEPV[il][il]; >> @@ -145,6 +148,7 @@ GLIBCXX_8.0 { >> _ZN11__gnu_debug30_Safe_unordered_container_base13_M_detach_allEv; >> _ZN11__gnu_debug25_Safe_local_iterator_base9_M_attachEPNS_19_Safe_sequence_baseEb; >>     _ZN11__gnu_debug25_Safe_local_iterator_base9_M_detachEv; >> + >> _ZN11__gnu_debug25_Safe_local_iterator_base16_M_attach_singleEPNS_19_Safe_sequence_baseEb; >> >>     # parallel mode >>     _ZN14__gnu_parallel9_Settings3getEv; >