[PATCH] D102099: [lld-macho] exported symbols can also be lazy

Greg McGary via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 7 18:07:52 PDT 2021


gkm created this revision.
gkm added a reviewer: lld-macho.
Herald added a reviewer: int3.
Herald added a project: lld-macho.
gkm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Literal (vs. patterns) exported symbols must be defined. Also accept LazySymbol alongside Defined.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D102099

Files:
  lld/MachO/Driver.cpp


Index: lld/MachO/Driver.cpp
===================================================================
--- lld/MachO/Driver.cpp
+++ lld/MachO/Driver.cpp
@@ -1155,7 +1155,7 @@
     for (const CachedHashStringRef &cachedName :
          config->exportedSymbols.literals) {
       if (const Symbol *sym = symtab->find(cachedName))
-        if (isa<Defined>(sym))
+        if (isa<Defined>(sym) || isa<LazySymbol>(sym))
           continue;
       error("undefined symbol " + cachedName.val() +
             "\n>>> referenced from option -exported_symbol(s_list)");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102099.343792.patch
Type: text/x-patch
Size: 555 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210508/ae9fe0b1/attachment.bin>


More information about the llvm-commits mailing list