[PATCH] D76252: [lld-macho] Add basic support for linking against dylibs

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 15 00:30:07 PDT 2020


smeenai added a comment.

I'll give other reviewers a few more days to take a look.



================
Comment at: lld/MachO/InputFiles.cpp:236
+      StringRef name = strtab + sym.n_strx;
+      symbols.push_back(symtab->addDylib(name, this));
+    }
----------------
We shouldn't be doing this for symbols that are undefined in the dylib's symbol table, right? (And if so, we should add a test for that, though I don't think that'll be possible till after your follow-ups.)

Looks like LLD ELF adds both defined and undefined symbols from dylibs into the symbol table, presumably to be able to check if all undefined symbols for dylibs are satisfied when linking an executable. Whether or not we do that depends on ld64's behavior there.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76252/new/

https://reviews.llvm.org/D76252





More information about the llvm-commits mailing list