From 9d5e6ccd9bbaffc5cf67ceb064251f1e0d1663ad Mon Sep 17 00:00:00 2001 From: Rafael Auler Date: Fri, 17 Jun 2022 13:04:40 -0700 Subject: [PATCH] [BOLT] Fix for missing entry offset Temporary fix for missing entry offset when creating address translation tables (BAT) after D127935 landed. Will later work on assigning a more reasonable offset different than zero. Reviewed By: Amir Differential Revision: https://reviews.llvm.org/D128092 --- bolt/lib/Passes/ValidateInternalCalls.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/bolt/lib/Passes/ValidateInternalCalls.cpp b/bolt/lib/Passes/ValidateInternalCalls.cpp index e420fe1..a46f37f 100644 --- a/bolt/lib/Passes/ValidateInternalCalls.cpp +++ b/bolt/lib/Passes/ValidateInternalCalls.cpp @@ -106,6 +106,7 @@ bool ValidateInternalCalls::fixCFGForPIC(BinaryFunction &Function) const { // block. std::vector> NewBBs; NewBBs.emplace_back(Function.createBasicBlock()); + NewBBs.back()->setOffset(0); NewBBs.back()->addInstructions(MovedInsts.begin(), MovedInsts.end()); BB.moveAllSuccessorsTo(NewBBs.back().get()); Function.insertBasicBlocks(&BB, std::move(NewBBs)); -- 2.7.4