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

Vladislav Khmelevsky via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 9 14:14:36 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:

It is not a principal question, but is there a logic behind marking new inserted symbols as weak? Basically I don't mind to move it upper, but I was curious about the logic on this.

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


More information about the llvm-commits mailing list