From cca9ef32476a6b7a821227edbb5f4c8a7a591849 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 3 Jul 2015 14:46:17 +0000 Subject: [PATCH] Delete dead code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241353 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Object/ELF.h | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/include/llvm/Object/ELF.h b/include/llvm/Object/ELF.h index a2ea7bc111e..3b0c548ffe1 100644 --- a/include/llvm/Object/ELF.h +++ b/include/llvm/Object/ELF.h @@ -370,7 +370,6 @@ public: ErrorOr getSymbolName(const Elf_Sym *Symb, bool IsDynamic) const; ErrorOr getSectionName(const Elf_Shdr *Section) const; - uint64_t getSymbolIndex(const Elf_Sym *sym) const; ErrorOr > getSectionContents(const Elf_Shdr *Sec) const; StringRef getLoadName() const; }; @@ -749,18 +748,6 @@ ELFFile::ELFFile(StringRef Object, std::error_code &EC) EC = std::error_code(); } -// Get the symbol table index in the symtab section given a symbol -template -uint64_t ELFFile::getSymbolIndex(const Elf_Sym *Sym) const { - uintptr_t SymLoc = uintptr_t(Sym); - uintptr_t SymTabLoc = uintptr_t(base() + dot_symtab_sec->sh_offset); - assert(SymLoc > SymTabLoc && "Symbol not in symbol table!"); - uint64_t SymOffset = SymLoc - SymTabLoc; - assert(SymOffset % dot_symtab_sec->sh_entsize == 0 && - "Symbol not multiple of symbol size!"); - return SymOffset / dot_symtab_sec->sh_entsize; -} - template const typename ELFFile::Elf_Shdr *ELFFile::section_begin() const { if (Header->e_shentsize != sizeof(Elf_Shdr)) -- 2.34.1