summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/MachOObject.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-11-27 13:26:12 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-11-27 13:26:12 +0000
commitc983afc5a1a050ab204be564e4bddbe251fc5e19 (patch)
treecfe0528ffd4e7e857ba5a3b77d8ec9826a40996a /llvm/lib/Object/MachOObject.cpp
parentf9c900d3c9ffc1c6f20e08ca962363397f7dc383 (diff)
downloadbcm5719-llvm-c983afc5a1a050ab204be564e4bddbe251fc5e19.tar.gz
bcm5719-llvm-c983afc5a1a050ab204be564e4bddbe251fc5e19.zip
macho-dump: Add support for dumping dysymtab indirect symbol table.
llvm-svn: 120214
Diffstat (limited to 'llvm/lib/Object/MachOObject.cpp')
-rw-r--r--llvm/lib/Object/MachOObject.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/lib/Object/MachOObject.cpp b/llvm/lib/Object/MachOObject.cpp
index 94f6d7763a4..236dfe0ce50 100644
--- a/llvm/lib/Object/MachOObject.cpp
+++ b/llvm/lib/Object/MachOObject.cpp
@@ -230,3 +230,16 @@ void MachOObject::ReadDysymtabLoadCommand(const LoadCommandInfo &LCI,
InMemoryStruct<macho::DysymtabLoadCommand> &Res) const {
ReadInMemoryStruct(*this, Buffer->getBuffer(), LCI.Offset, Res);
}
+
+template<>
+void SwapStruct(macho::IndirectSymbolTableEntry &Value) {
+ SwapValue(Value.Index);
+}
+void
+MachOObject::ReadIndirectSymbolTableEntry(const macho::DysymtabLoadCommand &DLC,
+ unsigned Index,
+ InMemoryStruct<macho::IndirectSymbolTableEntry> &Res) const {
+ uint64_t Offset = (DLC.IndirectSymbolTableOffset +
+ Index * sizeof(macho::IndirectSymbolTableEntry));
+ ReadInMemoryStruct(*this, Buffer->getBuffer(), Offset, Res);
+}
OpenPOWER on IntegriCloud