Check .rela instead of ELF64 for the compensation vaue resetting
authorMichael Liao <michael.liao@intel.com>
Tue, 16 Oct 2012 19:49:51 +0000 (19:49 +0000)
committerMichael Liao <michael.liao@intel.com>
Tue, 16 Oct 2012 19:49:51 +0000 (19:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166051 91177308-0d34-0410-b5e6-96231b3b80d8

lib/MC/ELFObjectWriter.cpp

index 6e37b5c1a0329c500241bb9194669b11763a214d..b8b3188ce4808da643272f6d83400f7a958e97d0 100644 (file)
@@ -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;
   }