[llvm] [BOLT] Skip _init; avoiding GOT breakage for static binaries (PR #117751)

Amir Ayupov via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 27 13:56:34 PST 2024


================
@@ -3061,7 +3079,9 @@ void RewriteInstance::selectFunctionsToProcess() {
     if (Function.isFragment())
       continue;
 
-    if (!shouldProcess(Function)) {
+    if (isStaticInitFunction(*BC, Function)) {
+      Function.setIgnored();
----------------
aaupov wrote:

Consider using `BC.getBinaryDataByName` to make this a one-time lookup.

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


More information about the llvm-commits mailing list