From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id EEAD23858D20 for ; Fri, 3 Feb 2023 11:47:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EEAD23858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675424874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=yVvRQg7Sfv3lqOLHrFziUu4ItZaXtsth3qE9eLaiHKk=; b=aUCTMZEnVzr8m1391s+gqAQDh2AvqoAGV/FrolaKElvmiWeICsKKemY2ZM68JhGC0SKI2Y exu6AV6rhwamUd1u1boZxNkZpOjAVvHSpWsAHnSahwcOXNKxfJ97ykuTO3hc3t1kxn9A0o dzbdgpuokjFqsuNhQtcaV04KrVb5HEA= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-19-rzZPf5cIPZGoGMKw0fMafw-1; Fri, 03 Feb 2023 06:47:53 -0500 X-MC-Unique: rzZPf5cIPZGoGMKw0fMafw-1 Received: by mail-wm1-f70.google.com with SMTP id l38-20020a05600c1d2600b003ddff4b9a40so2473431wms.9 for ; Fri, 03 Feb 2023 03:47:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :organization:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yVvRQg7Sfv3lqOLHrFziUu4ItZaXtsth3qE9eLaiHKk=; b=QmZhG5zQ4JJuT1rfDfDzZEnkYwOrZ1rDSBw/0ddKJkAaqAKjWk9DkIVJmEGWSvNDGB eObb9Vx2gSL28l9Qjhwiwlq+SOiUXvJDahHD+cQutQsnD667Out+58HX6Jk4cmFNAPw3 URZqHPxG5cUod7fIgTku7HLRTOoxP4PsnpN7CANvjZvLVKv8DGrOfhAkik5FhILaHWt7 NRcJGGiIMmbatoNej6TMaGgLW8i3RG/QcoIIlsGfFm4WnZiZiOXtqmbm46qDXz5VVQBS AXE0zMOpeQY6WuOUYzq7Kpr6RRTptleGqlPr502ya8qfKrwiWTAlQn6pFk6I3YKHa8lt EH4A== X-Gm-Message-State: AO0yUKV7xoL0oVXM/UqIRJrsSAPLLTa/+NO0HRJOzgfohfBLZOCN0HLm ktrxpYh71hmo8KGtCmcatUohA84wN511+yI8gTmzuzJWzua/SQZ9Fr4bECbmZ3KlSkejiFA7MoV 77eKZsvRXNPHzUSQg3qfl X-Received: by 2002:a05:600c:3489:b0:3d2:2d2a:d581 with SMTP id a9-20020a05600c348900b003d22d2ad581mr9530897wmq.30.1675424872092; Fri, 03 Feb 2023 03:47:52 -0800 (PST) X-Google-Smtp-Source: AK7set8XvGN9Zc1tS0DvIDeiulUJEVQH7RCTaXQAUUKnYvqKedtinrFeUvoLzLdKKPbjEKeDxZxnuA== X-Received: by 2002:a05:600c:3489:b0:3d2:2d2a:d581 with SMTP id a9-20020a05600c348900b003d22d2ad581mr9530886wmq.30.1675424871920; Fri, 03 Feb 2023 03:47:51 -0800 (PST) Received: from localhost ([88.120.130.27]) by smtp.gmail.com with ESMTPSA id r16-20020a05600c459000b003da28dfdedcsm2814166wmo.5.2023.02.03.03.47.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Feb 2023 03:47:51 -0800 (PST) Received: by localhost (Postfix, from userid 1000) id E81C018F6A6; Fri, 3 Feb 2023 12:47:50 +0100 (CET) From: Dodji Seketeli To: libabigail@sourceware.org Cc: gprocida@google.com, Dodji Seketeli Subject: [PATCH 2/4] dwarf-reader: Remove unused code Organization: Red Hat / France References: <878rhh8xwb.fsf@redhat.com> <87mt5vt3op.fsf@seketeli.org> X-Operating-System: CentOS Stream release 9 X-URL: http://www.redhat.com Date: Fri, 03 Feb 2023 12:47:50 +0100 In-Reply-To: <87mt5vt3op.fsf@seketeli.org> (Dodji Seketeli's message of "Fri, 03 Feb 2023 11:59:34 +0100") Message-ID: <87bkmbt1g9.fsf_-_@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hello, * src/abg-dwarf-reader.cc (reader::{find_symbol_table_section, lookup_native_elf_symbol_from_index}): Remove these dead functions. Signed-off-by: Dodji Seketeli --- src/abg-dwarf-reader.cc | 41 ----------------------------------------- 1 file changed, 41 deletions(-) diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc index ce6b52d4..566c9db1 100644 --- a/src/abg-dwarf-reader.cc +++ b/src/abg-dwarf-reader.cc @@ -4815,47 +4815,6 @@ public: var_decls_to_re_add_to_tree() {return var_decls_to_add_;} - /// The section containing the symbol table from the current ELF - /// file. - /// - /// Note that after it's first invocation, this function caches the - /// symbol table that it found. Subsequent invocations just return - /// the cached symbol table section. - /// - /// @return the symbol table section if found - Elf_Scn* - find_symbol_table_section() const - {return find_symbol_table_section();} - - /// Lookup an elf symbol, referred to by its index, from the .symtab - /// section. - /// - /// The resulting symbol returned is an instance of a GElf_Sym, from - /// the libelf library. - /// - /// @param symbol_index the index of the symbol to look up. - /// - /// @param elf_sym out parameter. This is set to the resulting ELF - /// symbol iff the function returns TRUE, meaning the symbol was - /// found. - /// - /// @return TRUE iff the symbol was found. - bool - lookup_native_elf_symbol_from_index(size_t symbol_index, GElf_Sym &elf_sym) - { - Elf_Scn* symtab_section = find_symbol_table_section(); - if (!symtab_section) - return false; - - Elf_Data* symtab = elf_getdata(symtab_section, 0); - ABG_ASSERT(symtab); - - if (!gelf_getsym(symtab, symbol_index, &elf_sym)) - return false; - - return true; - } - /// Test if a DIE represents a decl (function or variable) that has /// a symbol that is exported, whatever that means. This is /// supposed to work for Linux Kernel binaries as well. -- 2.31.1 -- Dodji