From d6f3168a08fabc3c2ef2451fdf3518dbf2da88ca Mon Sep 17 00:00:00 2001 From: Michael Liao Date: Tue, 16 Oct 2012 19:49:51 +0000 Subject: [PATCH] Check .rela instead of ELF64 for the compensation vaue resetting llvm-svn: 166051 --- llvm/lib/MC/ELFObjectWriter.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp index 6e37b5c..b8b3188 100644 --- a/llvm/lib/MC/ELFObjectWriter.cpp +++ b/llvm/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; } -- 2.7.4