[lld] Add archive file support to Mach-O backend
authorKellie Medlin <kelliem@fb.com>
Thu, 14 May 2020 19:43:51 +0000 (12:43 -0700)
committerJez Ng <jezng@fb.com>
Thu, 14 May 2020 19:58:35 +0000 (12:58 -0700)
commit2b920ae78c1d3fd36aeb7e77ca8de18a36b92344
tree47b5f206ed8c8b642f1330e2b1d5d66390fb6cc4
parent920ff806d4e9fd74f8c546a82e71d930e9b61003
[lld] Add archive file support to Mach-O backend

With this change, basic archive files can be linked together. Input
section discovery has been refactored into a function since archive
files lazily resolve their symbols / the object files containing those
symbols.

Reviewed By: int3, smeenai

Differential Revision: https://reviews.llvm.org/D78342
lld/MachO/Driver.cpp
lld/MachO/InputFiles.cpp
lld/MachO/InputFiles.h
lld/MachO/SymbolTable.cpp
lld/MachO/SymbolTable.h
lld/MachO/Symbols.cpp
lld/MachO/Symbols.h
lld/test/MachO/archive.s [new file with mode: 0644]
lld/test/MachO/invalid/archive-no-index.s [new file with mode: 0644]
lld/test/MachO/invalid/bad-archive.s [new file with mode: 0644]
lld/test/MachO/symbol-order.s [new file with mode: 0644]