Add cmdline options for LC_DATA_IN_CODE load command.
authorPete Cooper <peter_cooper@apple.com>
Tue, 9 Feb 2016 02:10:39 +0000 (02:10 +0000)
committerPete Cooper <peter_cooper@apple.com>
Tue, 9 Feb 2016 02:10:39 +0000 (02:10 +0000)
commit9b28a4559eb5c1f61501422c916469cc8f611fad
tree42424bd3dee277425fdaf5391b6cfc73359cc59e
parenta64e1adf849c07232c2bd27b90a59f29659211e7
Add cmdline options for LC_DATA_IN_CODE load command.

Also added the defaults for whether to generate this load command, which
the cmdline options are able to override.

There was also a difference to ld64 which is fixed here in that ld64 will
generate an empty data in code command if requested.

rdar://problem/24472630

llvm-svn: 260191
lld/include/lld/ReaderWriter/MachOLinkingContext.h
lld/lib/Driver/DarwinLdDriver.cpp
lld/lib/Driver/DarwinLdOptions.td
lld/lib/ReaderWriter/MachO/MachONormalizedFile.h
lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
lld/test/mach-o/data-in-code-load-command.yaml [new file with mode: 0644]