Change when we choose to add an LC_LOAD_DYLIB to the final image.
authorPete Cooper <peter_cooper@apple.com>
Thu, 11 Aug 2016 20:10:14 +0000 (20:10 +0000)
committerPete Cooper <peter_cooper@apple.com>
Thu, 11 Aug 2016 20:10:14 +0000 (20:10 +0000)
commit46cd113c871761c0c4831a44022ac2e1098d7b03
treef3821ea348a22ed3efb382cdee19c2faf56ffd88
parent610adaeec4557013b441960dc6ba1b6a72c1d337
Change when we choose to add an LC_LOAD_DYLIB to the final image.

Currently we do this when an atom is used, but we need to do it when a
dylib is referenced on the cmdline as this matches ld64.

This fixes much confusion over which maps are indexed with installName
vs path.  There is likely other confusion so i'll be seeing if i can remove
path() completely in a future commit as path() shouldn't really be needed by anyone.

llvm-svn: 278396
lld/include/lld/ReaderWriter/MachOLinkingContext.h
lld/lib/ReaderWriter/MachO/File.h
lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
lld/test/mach-o/use-dylib.yaml [new file with mode: 0644]