[PATCH] D95597: [RuntimeDyld] Don't error on symbols that resolve to 0

Moritz Sichert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 28 01:05:04 PST 2021


MoritzS created this revision.
MoritzS added a reviewer: lhames.
Herald added a subscriber: hiraditya.
MoritzS requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

A symbol can have 0 as its valid address. This happens with weak
undefined symbols in ELF, for example.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95597

Files:
  llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp


Index: llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
===================================================================
--- llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
+++ llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
@@ -1121,11 +1121,6 @@
         Flags = SymInfo.getFlags();
       }
 
-      // FIXME: Implement error handling that doesn't kill the host program!
-      if (!Addr)
-        report_fatal_error("Program used external function '" + Name +
-                           "' which could not be resolved!");
-
       // If Resolver returned UINT64_MAX, the client wants to handle this symbol
       // manually and we shouldn't resolve its relocations.
       if (Addr != UINT64_MAX) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95597.319782.patch
Type: text/x-patch
Size: 722 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210128/fd2f6e06/attachment.bin>


More information about the llvm-commits mailing list