[macho] Minor install_name fixes
authorJean-Daniel Dupas <devlists@shadowlab.org>
Sat, 20 Dec 2014 09:22:56 +0000 (09:22 +0000)
committerJean-Daniel Dupas <devlists@shadowlab.org>
Sat, 20 Dec 2014 09:22:56 +0000 (09:22 +0000)
commitedefcccd46355a27e802bdd72314d867433cbb04
tree7938dd682099e0c455d4b4c3208c27659168ee5f
parent968a21de24d5deedaa2247ded2c665aa197f2927
[macho] Minor install_name fixes

Summary:
Fix the binary file reader to properly read dyld version info.
Update the install_name test case to properly test the binary reader. We can't use '-print_atoms' as the output format is 'native' yaml and it does not contains the dyld current and compatibility versions.

Also change the timestamp value of LD_ID_DYLD to match the one generated by ld64.
The dynamic linker (dyld) used to expects different values for timestamp in LD_ID_DYLD and LD_LOAD_DYLD for prebound images. While prebinding is deprecated, we should probably keep it safe and match ld64.

Reviewers: kledzik

Subscribers: llvm-commits

Projects: #lld

Differential Revision: http://reviews.llvm.org/D6736

llvm-svn: 224681
lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
lld/test/mach-o/dylib-install-names.yaml