[PATCH] D35724: [ELF] - Fix missing relocation when linking executable with --unresolved-symbols=ignore-all

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 25 12:36:44 PDT 2017


ruiu added inline comments.


================
Comment at: ELF/Symbols.cpp:152
 
+  // Undefined external symbols in a non-DSO usually reported by linker and link
+  // fails, but together with --unresolved-symbols=ignore-all link succeeds and
----------------
Why do you have to move this code?


================
Comment at: ELF/Symbols.cpp:365-373
   if (computeBinding() == STB_LOCAL)
     return false;
-  return ExportDynamic || body()->isShared() ||
-         (body()->isUndefined() && Config->Shared);
+  if (ExportDynamic || body()->isShared())
+    return true;
+  if (!body()->isUndefined())
+    return false;
+  if (Config->Shared)
----------------
Does this order matter?


https://reviews.llvm.org/D35724





More information about the llvm-commits mailing list