diff options
Diffstat (limited to 'lib/MC/ELFObjectWriter.cpp')
-rw-r--r-- | lib/MC/ELFObjectWriter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/MC/ELFObjectWriter.cpp b/lib/MC/ELFObjectWriter.cpp index 0135662804..02a98bb947 100644 --- a/lib/MC/ELFObjectWriter.cpp +++ b/lib/MC/ELFObjectWriter.cpp @@ -462,13 +462,13 @@ void ELFObjectWriterImpl::RecordRelocation(const MCAssembler &Asm, uint64_t &FixedValue) { int64_t Addend = 0; unsigned Index = 0; + int64_t Value = Target.getConstant(); if (!Target.isAbsolute()) { const MCSymbol *Symbol = &Target.getSymA()->getSymbol(); MCSymbolData &SD = Asm.getSymbolData(*Symbol); const MCSymbolData *Base = Asm.getAtom(Layout, &SD); MCFragment *F = SD.getFragment(); - int64_t Value = Target.getConstant(); if (Base) { if (F && (!Symbol->isInSection() || SD.isCommon())) { @@ -496,9 +496,10 @@ void ELFObjectWriterImpl::RecordRelocation(const MCAssembler &Asm, return; } } - FixedValue = Value; } + FixedValue = Value; + // determine the type of the relocation bool IsPCRel = isFixupKindX86PCRel(Fixup.getKind()); unsigned Type; |