From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232]) by sourceware.org (Postfix) with ESMTPS id 1837C3861034 for ; Tue, 16 Mar 2021 18:43:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1837C3861034 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 relay12.mail.gandi.net (Postfix) with ESMTPSA id 2A81D20000C; Tue, 16 Mar 2021 18:43:01 +0000 (UTC) Received: by localhost (Postfix, from userid 1000) id 990925800FB; Tue, 16 Mar 2021 19:42:45 +0100 (CET) From: Dodji Seketeli To: Matthias Maennich Cc: libabigail@sourceware.org, gprocida@google.com, kernel-team@android.com Subject: Re: [PATCH 15/20] dwarf reader: drop (now) unused code related to symbol table reading Organization: Me, myself and I References: <20200619214305.562-1-maennich@google.com> <20210127125853.886677-1-maennich@google.com> <20210127125853.886677-16-maennich@google.com> X-Operating-System: Fedora 34 X-URL: http://www.seketeli.net/~dodji Date: Tue, 16 Mar 2021 19:42:45 +0100 In-Reply-To: <20210127125853.886677-16-maennich@google.com> (Matthias Maennich's message of "Wed, 27 Jan 2021 12:58:48 +0000") Message-ID: <87blbjx7mi.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=-10.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, 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: Tue, 16 Mar 2021 18:43:06 -0000 Hello, Matthias Maennich a =C3=A9crit: [...] > diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc > index 6d4e8ae23c53..91451208ef11 100644 > --- a/src/abg-dwarf-reader.cc > +++ b/src/abg-dwarf-reader.cc [...] > /// Build a @ref var_decl out of a DW_TAG_variable DIE. > /// > /// @param ctxt the read context to use. > @@ -14065,23 +13417,9 @@ build_var_decl(read_context& ctxt, > if (!result->get_symbol()) > { > elf_symbol_sptr var_sym; > - if (get_ignore_symbol_table(ctxt)) > - { > - string var_name =3D > - result->get_linkage_name().empty() > - ? result->get_name() > - : result->get_linkage_name(); > - > - var_sym =3D create_default_var_sym(var_name, ctxt.env()); > - ABG_ASSERT(var_sym); > - add_symbol_to_map(var_sym, ctxt.var_syms()); > - } > - else > - { > - Dwarf_Addr var_addr; > - if (ctxt.get_variable_address(die, var_addr)) > - var_sym =3D var_sym =3D ctxt.variable_symbol_is_exported(var_addr); > - } > + Dwarf_Addr var_addr; > + if (ctxt.get_variable_address(die, var_addr)) > + var_sym =3D var_sym =3D ctxt.variable_symbol_is_exported(var_addr); It looks like there is one 'var_sym =3D' too many. >=20=20 > if (var_sym) > { [...] > The introduction of the new symtab reader incorporated much of the > existing functionality. Now that the most code parts are migrated to the > new symtab reader, we can safely remove the old code paths. > > Ignoring the symbol table is not a thing anymore. The new symtab reader > does read the symtab unconditionally for consistency reasons. Hence also > remove all functionality around conditional symtab reading. > > * include/abg-dwarf-reader.h (set_ignore_symbol_table): Remove. > (get_ignore_symbol_table): Likewise. > * src/abg-dwarf-reader.cc (add_symbol_to_map): Likewise. > (read_context::options_type::ignore_symbol_table): Likewise. > (read_context::options_type): Adjust. > (read_context::fun_addr_sym_map_): Remove. > (read_context::fun_entry_addr_sym_map_): Likewise. > (read_context::fun_syms_): Likewise. > (read_context::var_addr_sym_map_): Likewise. > (read_context::var_syms_): Likewise. > (read_context::undefined_fun_syms_): Likewise. > (read_context::undefined_var_syms_): Likewise. > (read_context::initialize): Adjust. > (read_context::lookup_elf_symbol_from_index): Remove. > (read_context::fun_entry_addr_sym_map_sptr): Likewise. > (read_context::fun_entry_addr_sym_map): Likewise. > (read_context::fun_syms_sptr): Likewise. > (read_context::fun_syms): Likewise. > (read_context::var_syms_sptr): Likewise. > (read_context::var_syms): Likewise. > (read_context::undefined_fun_syms_sptr): Likewise. > (read_context::undefined_var_syms_sptr): Likewise. > (read_context::load_symbol_maps_from_symtab_section): Likewise. > (read_context::load_symbol_maps): Likewise. > (read_context::maybe_load_symbol_maps): Likewise. > (set_ignore_symbol_table): Likewise. > (get_ignore_symbol_table): Likewise. > (create_default_var_sym): Likewise. > (build_var_decl): Adjust. > (function_is_suppressed): Likewise. > (variable_is_suppressed): Likewise. > (build_function_decl): Likewise. > (add_symbol_to_map): Remove. > (read_corpus_from_elf): Adjust. > (build_corpus_group_from_kernel_dist_under): Likewise. > * tools/abidw.cc (main): Likewise. > > Reviewed-by: Giuliano Procida > Signed-off-by: Matthias Maennich OK to apply to master with the above change once the prerequisite patches have been applied. Thanks! [...] Cheers, --=20 Dodji