From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by sourceware.org (Postfix) with ESMTPS id 5FA323858D28 for ; Tue, 23 Nov 2021 17:15:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5FA323858D28 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 relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 0559FFF815; Tue, 23 Nov 2021 17:15:28 +0000 (UTC) Received: by localhost (Postfix, from userid 1000) id 09D26581C30; Tue, 23 Nov 2021 18:15:27 +0100 (CET) From: Dodji Seketeli To: Giuliano Procida Cc: libabigail@sourceware.org, kernel-team@android.com, maennich@google.com, mjw@redhat.com Subject: Re: [PATCH v3] Bug 28191 - Interpret DWARF 5 addrx locations Organization: Me, myself and I References: <20210827185755.953243-1-gprocida@google.com> <20211119150138.2930800-1-gprocida@google.com> X-Operating-System: Fedora 36 X-URL: http://www.seketeli.net/~dodji Date: Tue, 23 Nov 2021 18:15:27 +0100 In-Reply-To: <20211119150138.2930800-1-gprocida@google.com> (Giuliano Procida's message of "Fri, 19 Nov 2021 15:01:38 +0000") Message-ID: <87ilwiu72o.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.8 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, 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, 23 Nov 2021 17:15:34 -0000 [I am adding Mark to the list recipients as I am going to ask him a question below] Hello, Giuliano Procida a =C3=A9crit: > This change uses libdw facilities to interpret location expressions > instead of using libabigail's own mini-interpreter. With the fix for > elfutils https://sourceware.org/bugzilla/show_bug.cgi?id=3D28220 in > elfutils-0.186, abidw will correctly interpret Clang DWARF 5 symbol > addresses. Without that fix many declarations will not be linked to > their corresponding symbols due to the incorrect interpretation of > location attribute data. > > * src/abg-dwarf-reader.cc (die_location_address): Use > dwarf_attr_integrate, dwarf_getlocation and > dwarf_getlocation_attr to decode addreses, instead of > die_location_expr and eval_last_constant_dwarf_sub_expr. > * tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi: > Refresh test reference output; two more symbols have types. Thanks for looking into that. It seems to me that we can also do away with the use of eval_last_constant_= dwarf_sub_expr from die_member_offset. Would that work on your testing binaries? >From what I am seeing, dwarf_getlocation_attr and dwarf_getlocation are present in elfutils 0.176 which is the oldest version that we need to support, so we should be able to ditch eval_last_constant_dwarf_sub_expr and its dependencies altogether. Or what am I missing? [...] Cheers, --=20 Dodji