[mach-o] Support data-only dylibs
authorNick Kledzik <kledzik@apple.com>
Fri, 24 Oct 2014 22:19:22 +0000 (22:19 +0000)
committerNick Kledzik <kledzik@apple.com>
Fri, 24 Oct 2014 22:19:22 +0000 (22:19 +0000)
commit761d6549bc5a5e4223b3f27e3345b7cc1f0dea98
tree44104163b2abc5988536e50778fe32c94337aa46
parent7c2896a234e765c49f885d7689079a97b1651e32
[mach-o] Support data-only dylibs

In final linked shared images, the __TEXT segment contains both code and
the mach-o header/load-commands.  In the case of a data-only dylib, there is
no code, so we need to force the addition of the __TEXT segment.

llvm-svn: 220597
lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp
lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
lld/test/mach-o/data-only-dylib.yaml [new file with mode: 0644]
lld/test/mach-o/exe-offsets.yaml
lld/test/mach-o/exe-segment-overlap.yaml