forked from OSchip/llvm-project
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:
parent
5d7e8fcd52
commit
38438bae21
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue