1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00

Handle X86::reloc_riprel_4byte in 32 bits mode.

We can get there with .code64.

Fixes pr22349.

llvm-svn: 232651
This commit is contained in:
Rafael Espindola 2015-03-18 17:33:40 +00:00
parent 7223140027
commit b0e2e60a8d
2 changed files with 5 additions and 0 deletions

View File

@ -191,6 +191,7 @@ unsigned X86ELFObjectWriter::GetRelocType(const MCValue &Target,
}
break;
case X86::reloc_riprel_4byte:
case X86::reloc_signed_4byte:
case FK_PCRel_4:
case FK_Data_4:

View File

@ -65,6 +65,7 @@
// CHECK-NEXT: 0xA3 R_386_GOTOFF und_symbol 0x0
// Relocation 29 (zed@PLT) is of type R_386_PLT32 and uses the symbol
// CHECK-NEXT: 0xA9 R_386_PLT32 zed 0x0
// CHECK-NEXT: 0xAF R_386_PC32 tr_start 0x0
// CHECK-NEXT: }
// CHECK-NEXT: ]
@ -133,6 +134,9 @@ bar2:
leal 1 + und_symbol@GOTOFF, %edi
movl zed@PLT(%eax), %eax
.code64
jmpq *tr_start(%rip)
.section zedsec,"awT",@progbits
zed:
.long 0