mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Implement ELF::R_X86_64_GOTPCREL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115547 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cebdc01d66
commit
607d1f6d32
@ -588,6 +588,9 @@ void ELFObjectWriterImpl::RecordRelocation(const MCAssembler &Asm,
|
||||
case MCSymbolRefExpr::VK_PLT:
|
||||
Type = ELF::R_X86_64_PLT32;
|
||||
break;
|
||||
case llvm::MCSymbolRefExpr::VK_GOTPCREL:
|
||||
Type = ELF::R_X86_64_GOTPCREL;
|
||||
break;
|
||||
default:
|
||||
llvm_unreachable("Unimplemented");
|
||||
}
|
||||
|
@ -2,7 +2,8 @@
|
||||
|
||||
// Test that this produces a R_X86_64_GOT32.
|
||||
|
||||
movl foo@GOT, %eax
|
||||
movl foo@GOT, %eax
|
||||
movl foo@GOTPCREL(%rip), %eax
|
||||
|
||||
// CHECK: ('_relocations', [
|
||||
// CHECK-NEXT: # Relocation 0
|
||||
@ -11,4 +12,10 @@
|
||||
// CHECK-NEXT: ('r_type', 3)
|
||||
// CHECK-NEXT: ('r_addend',
|
||||
// CHECK-NEXT: ),
|
||||
// CHECK-NEXT: # Relocation 1
|
||||
// CHECK-NEXT: (('r_offset',
|
||||
// CHECK-NEXT: ('r_sym',
|
||||
// CHECK-NEXT: ('r_type', 9)
|
||||
// CHECK-NEXT: ('r_addend',
|
||||
// CHECK-NEXT: ),
|
||||
// CHECK-NEXT: ])
|
||||
|
Loading…
Reference in New Issue
Block a user