From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id 9E984383D81A for ; Fri, 27 May 2022 23:05:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9E984383D81A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from reform (deer0x07.wildebeest.org [172.31.17.137]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id B117E302FB8A; Sat, 28 May 2022 01:05:18 +0200 (CEST) Received: by reform (Postfix, from userid 1000) id 6FAF62E83D88; Sat, 28 May 2022 01:05:18 +0200 (CEST) Date: Sat, 28 May 2022 01:05:18 +0200 From: Mark Wielaard To: Dodji Seketeli Cc: gprocida@google.com, maennich@google.com, libabigail@sourceware.org Subject: Re: [PATCH] symtab-reader: Setup aliases before checking ppc64 opd function entries Message-ID: References: <20220516143423.097F8581C5E@localhost> <877d67szp8.fsf@seketeli.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <877d67szp8.fsf@seketeli.org> X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Fri, 27 May 2022 23:05:23 -0000 Hi Dodji, On Fri, May 27, 2022 at 06:33:07PM +0200, Dodji Seketeli wrote: > I have added support for ppc32 as well, as outlined above. > > Please find below the updated patch that I am proposing. > > From 8d44b582529ccd02689043918ef3ec3dd85155bc Mon Sep 17 00:00:00 2001 > From: Mark Wielaard > Date: Mon, 16 May 2022 10:53:55 +0200 > Subject: [PATCH] symtab-reader: Setup aliases before checking ppc64 opd > function entries > > The update_function_entry_address_symbol_map function checks whether > the given symbol is an alias of another symbol or a special ppc64 > ELFv1 function entry symbol. This requires the symbol aliases to > already been setup. But the alias entries were only setup after > calling update_function_entry_address_symbol_map. Make sure that the > symbol aliases have been setup and only then call the special ppc64 > update_function_entry_address_symbol_map function. But make sure the > arm32 function symbol entry address cleanup is done before checking > for aliases. > > This patch renames symtab::get_symbol_value into > symtab::setup_symbol_lookup_tables to better reflect what it does. > > It is in that function that the call to > update_function_entry_address_symbol_map is performed, the arm32 > symbol address cleanup is done and the ppc64 ELFv1 function address > plumbing is done. > > So arranging for update_function_entry_address_symbol_map to be called > after symbol aliases are setup for ppc64 is also done in that > function. That way, symtab::load_ only have to call > symtab::setup_symbol_lookup_tables to have aliases setup. > > This fixes runtestslowselfcompare.sh on ppc64 (ELFv1) with > ENABLE_SLOW_TEST=yes > > * src/abg-elf-helpers.h (architecture_is_ppc32): Declare new > function. > * src/abg-elf-helpers.cc (architecture_is_ppc32): Define it. > * src/abg-symtab-reader.cc > (symtab::setup_symbol_lookup_tables): Rename > symtab::get_symbol_value into this. Setup symbol aliases before > setting up function entry address maps for ppc{32,64} ELFv1 and > after fixing up arm32/64 addresses. > (symtab::load_): Invoke the new setup_symbol_lookup_tables. > update_function_entry_address_symbol_map after setting up aliases. > No need to setup symbol aliases anymore. > (symtab::add_alternative_address_lookups): Invoke the new > setup_symbol_lookup_tables. > > Signed-off-by: Mark Wielaard > Signed-off-by: Dodji Seketeli I read over it one more time and it all looks good to me. Cheers, Mark