From b21d9aebba7e45ddcbce61dd501000049cefb335 Mon Sep 17 00:00:00 2001 From: Michael Liao Date: Tue, 16 Oct 2012 19:49:51 +0000 Subject: 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 --- lib/MC/ELFObjectWriter.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/MC/ELFObjectWriter.cpp') 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; } -- cgit v1.2.3