From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay13.mail.gandi.net (relay13.mail.gandi.net [217.70.178.233]) by sourceware.org (Postfix) with ESMTPS id 437663858D29 for ; Mon, 15 Mar 2021 18:14:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 437663858D29 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=seketeli.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dodji@seketeli.org Received: from localhost (unknown [88.120.130.27]) (Authenticated sender: dodji@seketeli.org) by relay13.mail.gandi.net (Postfix) with ESMTPSA id 95B0C80008; Mon, 15 Mar 2021 18:14:07 +0000 (UTC) Received: by localhost (Postfix, from userid 1000) id 7A7C5580101; Mon, 15 Mar 2021 19:13:50 +0100 (CET) From: Dodji Seketeli To: Matthias Maennich Cc: libabigail@sourceware.org, gprocida@google.com, kernel-team@android.com Subject: Re: [PATCH 10/20] dwarf-reader: read_context: use new symtab in *_symbols_is_exported Organization: Me, myself and I References: <20200619214305.562-1-maennich@google.com> <20210127125853.886677-1-maennich@google.com> <20210127125853.886677-11-maennich@google.com> X-Operating-System: Fedora 34 X-URL: http://www.seketeli.net/~dodji Date: Mon, 15 Mar 2021 19:13:49 +0100 In-Reply-To: <20210127125853.886677-11-maennich@google.com> (Matthias Maennich's message of "Wed, 27 Jan 2021 12:58:43 +0000") Message-ID: <87y2eoxp2a.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=-4.0 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.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Mon, 15 Mar 2021 18:14:10 -0000 Matthias Maennich a =C3=A9crit: > Testing whether a symbol is exported can be simplified using the new > symtab implementation. The same holds true for whether a symbol is > exported via ksymtab in case of linux kernel binaries. So, do that. > > * src/abg-dwarf-reader.cc (function_symbol_is_exported): Use new > symtab implementation. > (variable_symbol_is_exported): Likewise. Note that just applying this patch regressed tests/runtestreaddwarf, especially while reading the binary data/test-read-dwarf/test-libandroid.so, which is an ARM32 binary. This is because for this patch to work, it needs to adaptation of this patch: commit 32c7829e4156666e1975329fb1b3201c43b5f84f Author: Giuliano Procida Date: Tue Mar 9 22:57:54 2021 +0000 DWARF reader: Interpret ARM32 ELF addresses correctly Bug 27552 - libabigail needs to interpret ARM32 symbol addresses sp= ecially The ARM32 ELF specification specifies that bit 0 of an ELF function address is a flag specifying whether the instructions are Thumb or ARM. So clear this bit before using the addresses for symbol mappin= g. * src/abg-dwarf-reader.cc (read_context::load_symbol_maps_from_symtab_section): Clear bit zero of ARM32 function addresses. * src/abg-elf-helpers.cc (architecture_is_arm32): Add new function. * src/abg-elf-helpers.h (architecture_is_arm32): Likewise. * tests/data/test-read-dwarf/test-libandroid.so.abi: Update. By adaptation, I mean that the the bit 0 of the ELF function address must be cleared in symtab::load in the abg-symtab-reader.cc file as well. > Reviewed-by: Giuliano Procida > Signed-off-by: Matthias Maennich OK to apply to master once the previous patches, including a patch doing the above, are applied. Thanks! [...] Cheers, --=20 Dodji