aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/MC/ELFObjectWriter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/MC/ELFObjectWriter.cpp b/lib/MC/ELFObjectWriter.cpp
index e71d546616..0135662804 100644
--- a/lib/MC/ELFObjectWriter.cpp
+++ b/lib/MC/ELFObjectWriter.cpp
@@ -480,7 +480,8 @@ void ELFObjectWriterImpl::RecordRelocation(const MCAssembler &Asm,
Value += Layout.getSymbolAddress(&SD) - Layout.getSymbolAddress(Base);
Addend = Value;
// Compensate for the addend on i386.
- FixedValue = Is64Bit ? 0 : Value;
+ if (Is64Bit)
+ Value = 0;
} else {
if (F) {
// Index of the section in .symtab against this symbol
@@ -495,6 +496,7 @@ void ELFObjectWriterImpl::RecordRelocation(const MCAssembler &Asm,
return;
}
}
+ FixedValue = Value;
}
// determine the type of the relocation