@@ -1919,8 +1919,7 @@ void RewriteInstance::relocateEHFrameSection() {
19191919 // Create a relocation against an absolute value since the goal is to
19201920 // preserve the contents of the section independent of the new values
19211921 // of referenced symbols.
1922- RelocatedEHFrameSection->addRelocation (Offset, nullptr , RelType,
1923- /* Optional*/ false , Value);
1922+ RelocatedEHFrameSection->addRelocation (Offset, nullptr , RelType, Value);
19241923 };
19251924
19261925 Error E = EHFrameParser::parse (DE, EHFrameSection->getAddress (), createReloc);
@@ -2456,8 +2455,7 @@ void RewriteInstance::readDynamicRelocations(const SectionRef &Section,
24562455 if (Symbol)
24572456 SymbolIndex[Symbol] = getRelocationSymbol (InputFile, Rel);
24582457
2459- BC->addDynamicRelocation (Rel.getOffset (), Symbol, RType, /* Optional*/ false ,
2460- Addend);
2458+ BC->addDynamicRelocation (Rel.getOffset (), Symbol, RType, Addend);
24612459 }
24622460}
24632461
@@ -2488,8 +2486,7 @@ void RewriteInstance::readDynamicRelrRelocations(BinarySection &Section) {
24882486 LLVM_DEBUG (dbgs () << " BOLT-DEBUG: R_*_RELATIVE relocation at 0x"
24892487 << Twine::utohexstr (Address) << " to 0x"
24902488 << Twine::utohexstr (Addend) << ' \n ' ;);
2491- BC->addDynamicRelocation (Address, nullptr , RType, /* Optional*/ false ,
2492- Addend);
2489+ BC->addDynamicRelocation (Address, nullptr , RType, Addend);
24932490 };
24942491
24952492 DataExtractor DE = DataExtractor (Section.getContents (),
@@ -2689,8 +2686,8 @@ void RewriteInstance::handleRelocation(const SectionRef &RelocatedSection,
26892686 // This might be a relocation for an ABS symbols like __global_pointer$ on
26902687 // RISC-V
26912688 ContainingBF->addRelocation (Rel.getOffset (), ReferencedSymbol,
2692- Relocation::getType (Rel), /* Optional */ false ,
2693- 0 , cantFail (Symbol.getValue ()));
2689+ Relocation::getType (Rel), 0 ,
2690+ cantFail (Symbol.getValue ()));
26942691 return ;
26952692 }
26962693 }
@@ -2722,7 +2719,7 @@ void RewriteInstance::handleRelocation(const SectionRef &RelocatedSection,
27222719 // the code. It's required to properly handle cases where
27232720 // "symbol + addend" references an object different from "symbol".
27242721 ContainingBF->addRelocation (Rel.getOffset (), ReferencedSymbol, RType,
2725- /* Optional */ false , Addend, ExtractedValue);
2722+ Addend, ExtractedValue);
27262723 } else {
27272724 LLVM_DEBUG ({
27282725 dbgs () << " BOLT-DEBUG: not creating PC-relative relocation at"
@@ -2956,10 +2953,10 @@ void RewriteInstance::handleRelocation(const SectionRef &RelocatedSection,
29562953
29572954 if (IsFromCode)
29582955 ContainingBF->addRelocation (Rel.getOffset (), ReferencedSymbol, RType,
2959- /* Optional */ false , Addend, ExtractedValue);
2956+ Addend, ExtractedValue);
29602957 else if (IsToCode || ForceRelocation)
2961- BC->addRelocation (Rel.getOffset (), ReferencedSymbol, RType,
2962- /* Optional */ false , Addend, ExtractedValue);
2958+ BC->addRelocation (Rel.getOffset (), ReferencedSymbol, RType, Addend,
2959+ ExtractedValue);
29632960 else
29642961 LLVM_DEBUG (dbgs () << " BOLT-DEBUG: ignoring relocation from data to data\n " );
29652962}
0 commit comments