[BOLT] Change Relocation Type to 32-bit NFCI (#130792)
This commit is contained in:
@@ -1900,7 +1900,7 @@ void RewriteInstance::relocateEHFrameSection() {
|
||||
if (!(DwarfType & dwarf::DW_EH_PE_sdata4))
|
||||
return;
|
||||
|
||||
uint64_t RelType;
|
||||
uint32_t RelType;
|
||||
switch (DwarfType & 0x0f) {
|
||||
default:
|
||||
llvm_unreachable("unsupported DWARF encoding type");
|
||||
@@ -2207,7 +2207,7 @@ uint32_t getRelocationSymbol(const ELFObjectFileBase *Obj,
|
||||
} // anonymous namespace
|
||||
|
||||
bool RewriteInstance::analyzeRelocation(
|
||||
const RelocationRef &Rel, uint64_t &RType, std::string &SymbolName,
|
||||
const RelocationRef &Rel, uint32_t &RType, std::string &SymbolName,
|
||||
bool &IsSectionRelocation, uint64_t &SymbolAddress, int64_t &Addend,
|
||||
uint64_t &ExtractedValue, bool &Skip) const {
|
||||
Skip = false;
|
||||
@@ -2426,7 +2426,7 @@ void RewriteInstance::readDynamicRelocations(const SectionRef &Section,
|
||||
});
|
||||
|
||||
for (const RelocationRef &Rel : Section.relocations()) {
|
||||
const uint64_t RType = Rel.getType();
|
||||
const uint32_t RType = Relocation::getType(Rel);
|
||||
if (Relocation::isNone(RType))
|
||||
continue;
|
||||
|
||||
@@ -2473,7 +2473,7 @@ void RewriteInstance::readDynamicRelrRelocations(BinarySection &Section) {
|
||||
<< ":\n";
|
||||
});
|
||||
|
||||
const uint64_t RType = Relocation::getRelative();
|
||||
const uint32_t RType = Relocation::getRelative();
|
||||
const uint8_t PSize = BC->AsmInfo->getCodePointerSize();
|
||||
const uint64_t MaxDelta = ((CHAR_BIT * DynamicRelrEntrySize) - 1) * PSize;
|
||||
|
||||
@@ -2586,7 +2586,7 @@ void RewriteInstance::handleRelocation(const SectionRef &RelocatedSection,
|
||||
|
||||
SmallString<16> TypeName;
|
||||
Rel.getTypeName(TypeName);
|
||||
uint64_t RType = Rel.getType();
|
||||
uint32_t RType = Relocation::getType(Rel);
|
||||
if (Relocation::skipRelocationType(RType))
|
||||
return;
|
||||
|
||||
@@ -2688,7 +2688,7 @@ void RewriteInstance::handleRelocation(const SectionRef &RelocatedSection,
|
||||
// This might be a relocation for an ABS symbols like __global_pointer$ on
|
||||
// RISC-V
|
||||
ContainingBF->addRelocation(Rel.getOffset(), ReferencedSymbol,
|
||||
Rel.getType(), 0,
|
||||
Relocation::getType(Rel), 0,
|
||||
cantFail(Symbol.getValue()));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user