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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 15 10:57:02 PDT 2020


MaskRay added inline comments.


================
Comment at: lld/MachO/InputFiles.cpp:236
+      StringRef name = strtab + sym.n_strx;
+      symbols.push_back(symtab->addDylib(name, this));
+    }
----------------
smeenai wrote:
> 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.
> 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.

Yes. See D57385 and D57569.


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