[lld-macho] Explicitly undefine literal exported symbols
authorGreg McGary <gkm@fb.com>
Sat, 8 May 2021 01:05:47 +0000 (18:05 -0700)
committerGreg McGary <gkm@fb.com>
Sat, 8 May 2021 18:37:00 +0000 (11:37 -0700)
commit5be8502271ac5644a7873fa801ecf537f8087d7f
tree471d1f4e4894586349946825925952ac662e0d3b
parent9ceea66602d9c11690004020a6e7a2b0f5291bd5
[lld-macho] Explicitly undefine literal exported symbols

Symbols explicitly exported via command-line options `--exported_symbol SYM` and `--exported_symbols_list FILE` must be defined. Before this fix, lazy symbols defined in archives would be left to languish. We now force them to be included in the linked output.

Differential Revision: https://reviews.llvm.org/D102100
lld/MachO/Driver.cpp
lld/test/MachO/export-options.s