summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorTim Northover <Tim.Northover@arm.com>2012-10-29 10:47:00 +0000
committerTim Northover <Tim.Northover@arm.com>2012-10-29 10:47:00 +0000
commit4f223bf7c484c1cf84b43ecd39b4f5a0f2f41053 (patch)
treeeb9fe6684952e1fa49f006f852e1da5f934df453 /llvm/lib
parentd29d5fa3f26d2b5e972cedaca218001f3aab4fb8 (diff)
downloadbcm5719-llvm-4f223bf7c484c1cf84b43ecd39b4f5a0f2f41053.tar.gz
bcm5719-llvm-4f223bf7c484c1cf84b43ecd39b4f5a0f2f41053.zip
Add interface for querying object files for symbol values.
Currently only implemented for ELF. Patch by Amara Emerson. llvm-svn: 166918
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Object/COFFObjectFile.cpp5
-rw-r--r--llvm/lib/Object/MachOObjectFile.cpp4
2 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp
index 064689c3f3c..0b7ee34c09a 100644
--- a/llvm/lib/Object/COFFObjectFile.cpp
+++ b/llvm/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/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp
index 55bac7cbdfc..45aeaac6b83 100644
--- a/llvm/lib/Object/MachOObjectFile.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud