From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by sourceware.org (Postfix) with ESMTPS id C0CF9385B83D; Tue, 16 Nov 2021 14:08:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C0CF9385B83D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=seketeli.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=seketeli.org Received: (Authenticated sender: dodji@seketeli.org) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 860E140006; Tue, 16 Nov 2021 14:08:40 +0000 (UTC) Received: by localhost (Postfix, from userid 1000) id 22D60581C23; Tue, 16 Nov 2021 15:08:39 +0100 (CET) From: Dodji Seketeli To: gprocida at google dot com via Libabigail Cc: gprocida at google dot com Subject: Re: [Bug default/28584] Clang doesn't emit DW_AT_external for some global variables so they are dropped by libabigail Organization: Me, myself and I References: X-Operating-System: Fedora 36 X-URL: http://www.seketeli.net/~dodji Date: Tue, 16 Nov 2021 15:08:39 +0100 In-Reply-To: (gprocida at google dot com via Libabigail's message of "Tue, 16 Nov 2021 10:57:12 +0000") Message-ID: <87ilws5h20.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2021 14:08:46 -0000 gprocida at google dot com via Libabigail a =C3=A9crit: > https://sourceware.org/bugzilla/show_bug.cgi?id=3D28584 > > --- Comment #6 from gprocida at google dot com --- > FTR, I was using Debian's dwarfdump from dwarfutils. > > Architecture: amd64 > Source: dwarfutils > Version: 20210528-1 > Depends: libc6 (>=3D 2.14), libdwarf1 (>=3D 20210528), libelf1 (>=3D 0.13= 1) > Description: utility to dump DWARF debug information from ELF objects > Dwarfdump is an application that can print the DWARF debugging > information of an ELF object file in a human-readable form. It can > also be used to check and validate manipulated DWARF sections. > . > This utility is part of dwarfutils. > Homepage: https://www.prevanders.net/dwarf.html Thanks. > I not that familiar with DWARF, but I was reading both the GCC and Clang = DWARF > as having two linked DIEs, one of which referred (via specification) to t= he > other (containing external). > > The real difference is just the scope at which the one DIE appeared. Even when you look at the behavious of the DWARF reader in the debugger, that difference of scope of the concrete-instance DIE doesn't matter. To determine the real scope of the variable represented by the DIE, what matters is the scope of the specification DIE of that concrete instance. And that is what libabigail takes into account. > As regards whether the change improves the library ABIs: > > 1594 extra symbols are now typed (yay!) That's progress, I guess. > 27124 symbols remain untyped, 21144 of which don't appear in the DWARF (a= s a > linkname) at all - Clang or some other build issue > > This leaves 5980 where they are there in the debug info (as a linkname) b= ut not > appearing in the ABI. Could be a Clang bug or Clang/libabigail > disagreement. > I'll continue to look into these 5980 and see if I can come up with small= test > cases to report. OK. So maybe we can close this bug then and open a new meta one with some broader ? Thanks! --=20 Dodji