diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2010-08-26 18:12:04 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2010-08-26 18:12:04 +0000 |
commit | 4ba1b3074b96bfa21dbfa1a019573c45a4f5bf84 (patch) | |
tree | 973586532e96c9e60e9354aab61a9f0ca1333ae3 /lib/MC/ELFObjectWriter.cpp | |
parent | 3b7bbfd36c1bcc542f3d434d56b0df11fb48c47c (diff) |
MCELF: Fix a thinko of mine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112203 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/ELFObjectWriter.cpp')
-rw-r--r-- | lib/MC/ELFObjectWriter.cpp | 4 |
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 |