[lld-macho] Add support for emitting dylibs with a single symbol
authorJez Ng <jezng@fb.com>
Mon, 27 Apr 2020 20:28:53 +0000 (13:28 -0700)
committerShoaib Meenai <smeenai@fb.com>
Mon, 27 Apr 2020 20:33:46 +0000 (13:33 -0700)
commit9598778bd1910e77ccd399f2c9e979c8ecf98e55
treedf08845bebb59aed66151900a0386a774c10193e
parenta3d95a50ee3397c89327fce6983624446cd8e9d7
[lld-macho] Add support for emitting dylibs with a single symbol

Summary:
Add logic for emitting the correct set of load commands and segments
when `-dylib` is passed.

I haven't gotten to implementing a real export trie yet, so we can only
emit a single symbol, but it's enough to replace the YAML test files
introduced in D76252.

Differential Revision: https://reviews.llvm.org/D76908
14 files changed:
lld/MachO/Config.h
lld/MachO/Driver.cpp
lld/MachO/Options.td
lld/MachO/SyntheticSections.cpp
lld/MachO/SyntheticSections.h
lld/MachO/Writer.cpp
lld/test/MachO/Inputs/goodbye-dylib.yaml [deleted file]
lld/test/MachO/Inputs/hello-dylib.yaml [deleted file]
lld/test/MachO/Inputs/libgoodbye.s [new file with mode: 0644]
lld/test/MachO/Inputs/libhello.s [new file with mode: 0644]
lld/test/MachO/dylib.s [new file with mode: 0644]
lld/test/MachO/dylink.s
lld/test/MachO/load-commands.s
lld/test/MachO/symtab.s