From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from confino.investici.org (confino.investici.org [93.190.126.19]) by sourceware.org (Postfix) with ESMTPS id A5BF33858D33 for ; Thu, 16 Feb 2023 18:40:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A5BF33858D33 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=autistici.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=autistici.org Received: from 1.mail-backend.investici.org (unknown [10.0.0.11]) by confino.investici.org (Postfix) with ESMTP id 4PHkJZ3WYnz11QQ; Thu, 16 Feb 2023 18:39:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1676572798; bh=CaCokiWslzyXHaqQjmoZsAOmPzybKmAIpT06RECzkVY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nwTtpw7kfpCkJJl9dHRlLwvPxaUsSFAKI5P5qcLiuKmFpCBRbmmcq5yTf4Qj9ELUc 12E7G/bmtnDeiCvjp7ZviQngCO2YpwfrnhrOByk1g7WHFZpe2g71rbppl407qaZpDk FWENrtuKpAV7+2Z+Lc5NnDc2GNR/5QjqZWjyrZEA= Received: from 1.webmail.investici.org (localhost [127.0.0.1]) (Authenticated sender: i.nixman@autistici.org) by 1.mail-backend.investici.org (Postfix) with ESMTPA id 4PHkJZ22Kzz5w3C; Thu, 16 Feb 2023 18:39:58 +0000 (UTC) MIME-Version: 1.0 Date: Thu, 16 Feb 2023 18:39:58 +0000 From: i.nixman@autistici.org To: Jonathan Wakely Cc: Gcc Help Subject: Re: Extra import symbol in debug build In-Reply-To: References: <4f36cb6cb8e444073e1a9e253e861920@autistici.org> User-Agent: Roundcube Webmail Message-ID: <82d48ece08fbe9d59cca0cebd8d04f58@autistici.org> X-Sender: i.nixman@autistici.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2023-02-16 15:29, Jonathan Wakely wrote: > On Thu, 16 Feb 2023 at 15:25, i.nixman--- via Gcc-help > wrote: >> >> hello, >> >> >> I can successfully build the same C++ code using GCC-8.3.1 for Debug >> (-g >> -O0) and Release (-g -O2) build. >> I can successfully debug the Release-executable on a remote host, but >> I >> can't debug the Debug-executable on a remote host, because the >> Debug-executable imports an extra symbol >> _ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv from libstdc++ which >> doesn't >> exist. > > It should exist, it has been there since GCC hmm... I just checked the two binaries using this cmd: > readelf -sW executable | grep > _ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv it shows nothing for release build, and shows this for debug build: > 54: 0000000000000000 0 FUNC GLOBAL DEFAULT UND > _ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv > 199898: 0000000000000000 0 FUNC GLOBAL DEFAULT UND > _ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv what should I do next to understand the reason? moreover, im unsure I understand the reason correctly... best! > >> >> but I don't want to debug libstdc++, so I think I shouldn't install >> additional debug version of libstdc++. >> >> it looks like a bug, or am I wrong? >> >> another my question is, what should I do to get rid of that extra >> symbol >> in Debug build? >> >> >> >> >> best! >> >> ps >> I can't update GCC nor libstdc++.