Check .rela instead of ELF64 for the compensation vaue resetting
[oota-llvm.git] / 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;
   }