[PATCH] D64136: [ELF] resolveUndefined: ignore undefined symbols in SharedFile

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 3 09:18:21 PDT 2019


MaskRay marked an inline comment as done.
MaskRay added inline comments.


================
Comment at: ELF/Symbols.cpp:413
 
+  // Ignore undefined symbols in a SharedFile.
+  if (isa_and_nonnull<SharedFile>(Other.File))
----------------
peter.smith wrote:
> Wouldn't this prevent a non-weak reference from a shared library from fetching an archive member? Or am I missing something else that permits that. Apologies I've not got much time left today.
No worries!

Thank you for noticing this. It turns out we do not have a test to check a shared reference can fetch an archive. I thus added the test to `test/ELF/archive-fetch.s`

Moved the logic below the `if (isLazy()) {...}` branch.


Repository:
  rLLD LLVM Linker

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

https://reviews.llvm.org/D64136





More information about the llvm-commits mailing list