[llvm] [BOLT][runtime] Add start & fini symbols (PR #68505)

Rafael Auler via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 9 14:09:58 PDT 2023


================
@@ -4568,6 +4568,26 @@ void RewriteInstance::updateELFSymbolTable(
     }
   }
 
+  // Add runtime library start and fini address symbols
+  if (RuntimeLibrary *RtLibrary = BC->getRuntimeLibrary()) {
+    auto AddSymbol = [&](StringRef Name, uint64_t Address) {
----------------
rafaelauler wrote:

I don't understand why we're defining a new AddSymbol lambda here? Can't we just move the definition that we already have in line 4597 to line 4570 and use that?

https://github.com/llvm/llvm-project/pull/68505


More information about the llvm-commits mailing list