public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: Dodji Seketeli <dodji@redhat.com>
To: libabigail@sourceware.org
Cc: gprocida@google.com,  Dodji Seketeli <dodji@redhat.com>
Subject: [PATCH 2/4] dwarf-reader: Remove unused code
Date: Fri, 03 Feb 2023 12:47:50 +0100	[thread overview]
Message-ID: <87bkmbt1g9.fsf_-_@redhat.com> (raw)
In-Reply-To: <87mt5vt3op.fsf@seketeli.org> (Dodji Seketeli's message of "Fri, 03 Feb 2023 11:59:34 +0100")

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 <dodji@redhat.com>
---
 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


  parent reply	other threads:[~2023-02-03 11:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-01 10:48 [PATCH, RFC] {dwarf,elf_based}-reader,writer: Avoid duplicating corpora in corpus_group Dodji Seketeli
2023-02-03 10:59 ` [PATCH 0/4] Fix duplicated corpora in corpus group Dodji Seketeli
2023-02-03 11:47   ` [PATCH 1/4] fe-iface: Add missing virtual destructor Dodji Seketeli
2023-02-03 11:47   ` Dodji Seketeli [this message]
2023-02-03 11:48   ` [PATCH 3/4] corpus: Handle empty symbol table cases Dodji Seketeli
2023-02-03 11:49   ` [PATCH 4/4] {dwarf,elf_based}-reader,writer: Avoid duplicating corpora in corpus_group Dodji Seketeli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bkmbt1g9.fsf_-_@redhat.com \
    --to=dodji@redhat.com \
    --cc=gprocida@google.com \
    --cc=libabigail@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).