aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/ELFObjectFile.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-07-15 18:39:21 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-07-15 18:39:21 +0000
commitf6f3e81c0756246d2488f6a81b1f9100416fbfdb (patch)
tree8b394fedf6ccc0b4b69210236e008af23a4c9042 /llvm/lib/Object/ELFObjectFile.cpp
parent1b87c806787cdecd096e2a1604c1e237cd38d453 (diff)
downloadllvm-f6f3e81c0756246d2488f6a81b1f9100416fbfdb.zip
llvm-f6f3e81c0756246d2488f6a81b1f9100416fbfdb.tar.gz
llvm-f6f3e81c0756246d2488f6a81b1f9100416fbfdb.tar.bz2
ObjectFile: Add a method to check whether a section contains a symbol.
- No ELF or COFF implementation yet, I don't have a way to test that. Should be straightforward to add though. llvm-svn: 135288
Diffstat (limited to 'llvm/lib/Object/ELFObjectFile.cpp')
-rw-r--r--llvm/lib/Object/ELFObjectFile.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/Object/ELFObjectFile.cpp b/llvm/lib/Object/ELFObjectFile.cpp
index edf9824..e2ff4df 100644
--- a/llvm/lib/Object/ELFObjectFile.cpp
+++ b/llvm/lib/Object/ELFObjectFile.cpp
@@ -235,6 +235,8 @@ protected:
virtual error_code getSectionSize(DataRefImpl Sec, uint64_t &Res) const;
virtual error_code getSectionContents(DataRefImpl Sec, StringRef &Res) const;
virtual error_code isSectionText(DataRefImpl Sec, bool &Res) const;
+ virtual error_code sectionContainsSymbol(DataRefImpl Sec, DataRefImpl Symb,
+ bool &Result) const;
public:
ELFObjectFile(MemoryBuffer *Object, error_code &ec);
@@ -496,6 +498,16 @@ error_code ELFObjectFile<target_endianness, is64Bits>
}
template<support::endianness target_endianness, bool is64Bits>
+error_code ELFObjectFile<target_endianness, is64Bits>
+ ::sectionContainsSymbol(DataRefImpl Sec,
+ DataRefImpl Symb,
+ bool &Result) const {
+ // FIXME: Unimplemented.
+ Result = false;
+ return object_error::success;
+}
+
+template<support::endianness target_endianness, bool is64Bits>
ELFObjectFile<target_endianness, is64Bits>::ELFObjectFile(MemoryBuffer *Object
, error_code &ec)
: ObjectFile(Binary::isELF, Object, ec)