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

Vladislav Khmelevsky via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 9 14:31:33 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) {
----------------
yota9 wrote:

I don't really think it does matter. What does matter is that I realised why at first I did use __bolt_runtime_start and not __bolt_instr_start, it is because it is not instrumentation-specific code, but runtime and every runtime library would have it's own naming. So I would revert my last change back to old symbol name. That is why I we can't use old lambda also, since we're creating this symbol and didn't emit the symbol with such name previously.

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


More information about the llvm-commits mailing list