@@ -4259,21 +4259,21 @@ void BinaryFunction::updateOutputValues(const BOLTLinker &Linker) {
42594259
42604260 if (BC.HasRelocations || isInjected ()) {
42614261 if (hasConstantIsland ()) {
4262- const auto DataAddress =
4263- Linker.lookupSymbol (getFunctionConstantIslandLabel ()->getName ());
4264- assert (DataAddress && " Cannot find function CI symbol" );
4265- setOutputDataAddress (*DataAddress );
4262+ const auto IslandLabelSymInfo =
4263+ Linker.lookupSymbolInfo (getFunctionConstantIslandLabel ()->getName ());
4264+ assert (IslandLabelSymInfo && " Cannot find function CI symbol" );
4265+ setOutputDataAddress (IslandLabelSymInfo-> Address );
42664266 for (auto It : Islands->Offsets ) {
42674267 const uint64_t OldOffset = It.first ;
42684268 BinaryData *BD = BC.getBinaryDataAtAddress (getAddress () + OldOffset);
42694269 if (!BD)
42704270 continue ;
42714271
42724272 MCSymbol *Symbol = It.second ;
4273- const auto NewAddress = Linker.lookupSymbol (Symbol->getName ());
4274- assert (NewAddress && " Cannot find CI symbol" );
4273+ const auto SymInfo = Linker.lookupSymbolInfo (Symbol->getName ());
4274+ assert (SymInfo && " Cannot find CI symbol" );
42754275 auto &Section = *getCodeSection ();
4276- const auto NewOffset = *NewAddress - Section.getOutputAddress ();
4276+ const auto NewOffset = SymInfo-> Address - Section.getOutputAddress ();
42774277 BD->setOutputLocation (Section, NewOffset);
42784278 }
42794279 }
@@ -4298,10 +4298,10 @@ void BinaryFunction::updateOutputValues(const BOLTLinker &Linker) {
42984298 FF.setAddress (ColdStartSymbolInfo->Address );
42994299 FF.setImageSize (ColdStartSymbolInfo->Size );
43004300 if (hasConstantIsland ()) {
4301- const auto DataAddress = Linker.lookupSymbol (
4301+ const auto SymInfo = Linker.lookupSymbolInfo (
43024302 getFunctionColdConstantIslandLabel ()->getName ());
4303- assert (DataAddress && " Cannot find cold CI symbol" );
4304- setOutputColdDataAddress (*DataAddress );
4303+ assert (SymInfo && " Cannot find cold CI symbol" );
4304+ setOutputColdDataAddress (SymInfo-> Address );
43054305 }
43064306 }
43074307 }
0 commit comments