diff options
author | Tim Northover <tnorthover@apple.com> | 2014-07-01 08:15:41 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2014-07-01 08:15:41 +0000 |
commit | 301c4e690a84d262125674f34d4b23a09649fdec (patch) | |
tree | d39de833c582800a1456f0ff76579366341093f2 /lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp | |
parent | 012dff0b237c860b8371332aa588756689e60be5 (diff) | |
download | bcm5719-llvm-301c4e690a84d262125674f34d4b23a09649fdec.tar.gz bcm5719-llvm-301c4e690a84d262125674f34d4b23a09649fdec.zip |
[mach-o] add representation for LC_ID_DYLIB to MachONormalizedFile
It still needs to be tied into BinaryReader, but this allows reasonably
sensible creation of SharedLibrary atoms on MachO.
llvm-svn: 212093
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp')
-rw-r--r-- | lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp | 9 |
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) |