summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp')
-rw-r--r--lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
index bf93a00d67f..7c599152e8b 100644
--- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
+++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
@@ -386,6 +386,15 @@ readBinary(std::unique_ptr<MemoryBuffer> &mb,
}
}
}
+ if (cmd == LC_ID_DYLIB) {
+ const dylib_command *dl = reinterpret_cast<const dylib_command*>(lc);
+ dylib_command tempDL;
+ if (swap) {
+ tempDL = *dl; swapStruct(tempDL); dl = &tempDL;
+ }
+
+ f->installName = lc + dl->dylib.name;
+ }
return false;
});
if (ec)
OpenPOWER on IntegriCloud