[llvm] r274754 - Don't crash trying to relax 32 loads on COFF.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 7 07:00:08 PDT 2016
Author: rafael
Date: Thu Jul 7 09:00:07 2016
New Revision: 274754
URL: http://llvm.org/viewvc/llvm-project?rev=274754&view=rev
Log:
Don't crash trying to relax 32 loads on COFF.
Fixes pr28452.
Modified:
llvm/trunk/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp
llvm/trunk/test/MC/COFF/relax-reloc.s
Modified: llvm/trunk/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp?rev=274754&r1=274753&r2=274754&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp (original)
+++ llvm/trunk/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp Thu Jul 7 09:00:07 2016
@@ -58,6 +58,7 @@ unsigned X86WinCOFFObjectWriter::getRelo
return COFF::IMAGE_REL_AMD64_REL32;
case FK_Data_4:
case X86::reloc_signed_4byte:
+ case X86::reloc_signed_4byte_relax:
if (Modifier == MCSymbolRefExpr::VK_COFF_IMGREL32)
return COFF::IMAGE_REL_AMD64_ADDR32NB;
if (Modifier == MCSymbolRefExpr::VK_SECREL)
Modified: llvm/trunk/test/MC/COFF/relax-reloc.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/COFF/relax-reloc.s?rev=274754&r1=274753&r2=274754&view=diff
==============================================================================
--- llvm/trunk/test/MC/COFF/relax-reloc.s (original)
+++ llvm/trunk/test/MC/COFF/relax-reloc.s Thu Jul 7 09:00:07 2016
@@ -2,5 +2,6 @@
// Don't crash trying to create relaxable relocations on COFF.
+ movl bar(%eax), %ebx
add bar(%rip), %rax
call *bar(%rip)
More information about the llvm-commits
mailing list