summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/MachOObject.cpp
diff options
context:
space:
mode:
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