aboutsummaryrefslogtreecommitdiff
path: root/lib/MC/ELFObjectWriter.cpp
diff options
context:
space:
mode:
authorMichael Liao <michael.liao@intel.com>2012-10-16 19:49:51 +0000
committerMichael Liao <michael.liao@intel.com>2012-10-16 19:49:51 +0000
commitb21d9aebba7e45ddcbce61dd501000049cefb335 (patch)
tree8107f1e0eaa035372914b052fd714205d3b80954 /lib/MC/ELFObjectWriter.cpp
parent59de622e8f2742c16b5a305ac5fe6d0814e7786b (diff)
Check .rela instead of ELF64 for the compensation vaue resetting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166051 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/ELFObjectWriter.cpp')
-rw-r--r--lib/MC/ELFObjectWriter.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/MC/ELFObjectWriter.cpp b/lib/MC/ELFObjectWriter.cpp
index 6e37b5c1a0..b8b3188ce4 100644
--- a/lib/MC/ELFObjectWriter.cpp
+++ b/lib/MC/ELFObjectWriter.cpp
@@ -733,8 +733,7 @@ void ELFObjectWriter::RecordRelocation(const MCAssembler &Asm,
Index = -1;
}
Addend = Value;
- // Compensate for the addend on i386.
- if (is64Bit())
+ if (hasRelocationAddend())
Value = 0;
}