[PATCH] D149541: [JITLink] Process null symbols

Lang Hames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 4 16:13:39 PDT 2023


lhames accepted this revision.
lhames added a comment.
This revision is now accepted and ready to land.

See naming comment, but otherwise LGTM. Thanks very much @jobnoorman!



================
Comment at: llvm/lib/ExecutionEngine/JITLink/ELFLinkGraphBuilder.h:552-553
+
+      auto &GSym = G->addAbsoluteSymbol(*Name, orc::ExecutorAddr(0), 0,
+                                        Linkage::Strong, Scope::Local, false);
+      setGraphSymbol(SymIndex, GSym);
----------------
Let's name these `__jitlink_ELF_SYM_UND_<st_value>` -- it'll make them easy to spot when debugging, and allow us to keep the invariant that all absolute symbols are named (which means that the change to `JITLink.cpp` would no longer be needed).

Side note: We should probably change `Symbol::hasName` so that empty symbols still count as valid names, but that's outside the scope of this patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149541



More information about the llvm-commits mailing list