summaryrefslogtreecommitdiff
path: root/lib/Object/MachOObject.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-11-27 13:58:16 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-11-27 13:58:16 +0000
commit71130f8aa1cef096083b95267a8a688a3bef6426 (patch)
tree8e59931bc6a7906b72e98e26f832a55039361bf2 /lib/Object/MachOObject.cpp
parent2208b58b83392b2a3558e556c7447b13c3aea857 (diff)
macho-dump: Add support for --dump-section-data and tweak a few format strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120219 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Object/MachOObject.cpp')
-rw-r--r--lib/Object/MachOObject.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Object/MachOObject.cpp b/lib/Object/MachOObject.cpp
index 33890f6617a..1051ce27fa0 100644
--- a/lib/Object/MachOObject.cpp
+++ b/lib/Object/MachOObject.cpp
@@ -125,6 +125,10 @@ MachOObject *MachOObject::LoadFromBuffer(MemoryBuffer *Buffer,
return Object.take();
}
+StringRef MachOObject::getData(size_t Offset, size_t Size) const {
+ return Buffer->getBuffer().substr(Offset,Size);
+}
+
void MachOObject::RegisterStringTable(macho::SymtabLoadCommand &SLC) {
HasStringTable = true;
StringTable = Buffer->getBuffer().substr(SLC.StringTableOffset,