aboutsummaryrefslogtreecommitdiff
path: root/lib/Object/MachOObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Object/MachOObject.cpp')
-rw-r--r--lib/Object/MachOObject.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Object/MachOObject.cpp b/lib/Object/MachOObject.cpp
index 94f6d7763a..236dfe0ce5 100644
--- a/lib/Object/MachOObject.cpp
+++ b/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);
+}