mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-16 21:21:06 +00:00
Fix a crash when producing COFF.
llvm-svn: 271229
This commit is contained in:
parent
d788c9d83d
commit
4f1062adb8
@ -53,6 +53,8 @@ unsigned X86WinCOFFObjectWriter::getRelocType(const MCValue &Target,
|
||||
case FK_PCRel_4:
|
||||
case X86::reloc_riprel_4byte:
|
||||
case X86::reloc_riprel_4byte_movq_load:
|
||||
case X86::reloc_riprel_4byte_relax:
|
||||
case X86::reloc_riprel_4byte_relax_rex:
|
||||
return COFF::IMAGE_REL_AMD64_REL32;
|
||||
case FK_Data_4:
|
||||
case X86::reloc_signed_4byte:
|
||||
|
6
llvm/test/MC/COFF/relax-reloc.s
Normal file
6
llvm/test/MC/COFF/relax-reloc.s
Normal file
@ -0,0 +1,6 @@
|
||||
// RUN: llvm-mc %s -o %t -filetype=obj -triple=x86_64-pc-win32
|
||||
|
||||
// Don't crash trying to create relaxable relocations on COFF.
|
||||
|
||||
add bar(%rip), %rax
|
||||
call *bar(%rip)
|
Loading…
x
Reference in New Issue
Block a user