From a41dce3c642e50775352cce49e3a3d0cd004d393 Mon Sep 17 00:00:00 2001 From: Tim Northover Date: Mon, 29 Oct 2012 10:47:00 +0000 Subject: Add interface for querying object files for symbol values. Currently only implemented for ELF. Patch by Amara Emerson. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166918 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Object/COFFObjectFile.cpp | 5 +++++ lib/Object/MachOObjectFile.cpp | 4 ++++ 2 files changed, 9 insertions(+) (limited to 'lib/Object') diff --git a/lib/Object/COFFObjectFile.cpp b/lib/Object/COFFObjectFile.cpp index 064689c3f3..0b7ee34c09 100644 --- a/lib/Object/COFFObjectFile.cpp +++ b/lib/Object/COFFObjectFile.cpp @@ -288,6 +288,11 @@ error_code COFFObjectFile::getSymbolSection(DataRefImpl Symb, return object_error::success; } +error_code COFFObjectFile::getSymbolValue(DataRefImpl Symb, + uint64_t &Val) const { + report_fatal_error("getSymbolValue unimplemented in COFFObjectFile"); +} + error_code COFFObjectFile::getSectionNext(DataRefImpl Sec, SectionRef &Result) const { const coff_section *sec = toSec(Sec); diff --git a/lib/Object/MachOObjectFile.cpp b/lib/Object/MachOObjectFile.cpp index 55bac7cbdf..45aeaac6b8 100644 --- a/lib/Object/MachOObjectFile.cpp +++ b/lib/Object/MachOObjectFile.cpp @@ -363,6 +363,10 @@ error_code MachOObjectFile::getSymbolType(DataRefImpl Symb, return object_error::success; } +error_code MachOObjectFile::getSymbolValue(DataRefImpl Symb, + uint64_t &Val) const { + report_fatal_error("getSymbolValue unimplemented in MachOObjectFile"); +} symbol_iterator MachOObjectFile::begin_symbols() const { // DRI.d.a = segment number; DRI.d.b = symbol index. -- cgit v1.2.3