aboutsummaryrefslogtreecommitdiff
path: root/bolt/lib/Rewrite/RewriteInstance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bolt/lib/Rewrite/RewriteInstance.cpp')
-rw-r--r--bolt/lib/Rewrite/RewriteInstance.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/bolt/lib/Rewrite/RewriteInstance.cpp b/bolt/lib/Rewrite/RewriteInstance.cpp
index 8b78c53..c13a9f0 100644
--- a/bolt/lib/Rewrite/RewriteInstance.cpp
+++ b/bolt/lib/Rewrite/RewriteInstance.cpp
@@ -2274,8 +2274,7 @@ uint32_t getRelocationSymbol(const ELFObjectFileBase *Obj,
bool RewriteInstance::analyzeRelocation(
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;
+ uint64_t &ExtractedValue) const {
if (!Relocation::isSupported(RType))
return false;
@@ -2707,9 +2706,8 @@ void RewriteInstance::handleRelocation(const SectionRef &RelocatedSection,
int64_t Addend;
uint64_t ExtractedValue;
bool IsSectionRelocation;
- bool Skip;
if (!analyzeRelocation(Rel, RType, SymbolName, IsSectionRelocation,
- SymbolAddress, Addend, ExtractedValue, Skip)) {
+ SymbolAddress, Addend, ExtractedValue)) {
LLVM_DEBUG({
dbgs() << "BOLT-WARNING: failed to analyze relocation @ offset = "
<< formatv("{0:x}; type name = {1}\n", Rel.getOffset(), TypeName);
@@ -2718,14 +2716,6 @@ void RewriteInstance::handleRelocation(const SectionRef &RelocatedSection,
return;
}
- if (Skip) {
- LLVM_DEBUG({
- dbgs() << "BOLT-DEBUG: skipping relocation @ offset = "
- << formatv("{0:x}; type name = {1}\n", Rel.getOffset(), TypeName);
- });
- return;
- }
-
if (!IsFromCode && !IsWritable && (IsX86 || IsAArch64) &&
Relocation::isPCRelative(RType)) {
BinaryData *BD = BC->getBinaryDataContainingAddress(Rel.getOffset());