mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Integrate Assembler: Support X86_64_DTPOFF64 relocations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185131 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8e7294f995
commit
c084c0945b
@ -101,7 +101,18 @@ unsigned X86ELFObjectWriter::GetRelocType(const MCValue &Target,
|
||||
} else {
|
||||
switch ((unsigned)Fixup.getKind()) {
|
||||
default: llvm_unreachable("invalid fixup kind!");
|
||||
case FK_Data_8: Type = ELF::R_X86_64_64; break;
|
||||
case FK_Data_8:
|
||||
switch (Modifier) {
|
||||
default:
|
||||
llvm_unreachable("Unimplemented");
|
||||
case MCSymbolRefExpr::VK_None:
|
||||
Type = ELF::R_X86_64_64;
|
||||
break;
|
||||
case MCSymbolRefExpr::VK_DTPOFF:
|
||||
Type = ELF::R_X86_64_DTPOFF64;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case X86::reloc_signed_4byte:
|
||||
switch (Modifier) {
|
||||
default:
|
||||
|
@ -18,7 +18,7 @@ bar:
|
||||
movq foo(%rip), %rdx
|
||||
leaq foo-bar(%r14),%r14
|
||||
addq $bar,%rax # R_X86_64_32S
|
||||
|
||||
.quad foo@DTPOFF
|
||||
|
||||
// CHECK: Section {
|
||||
// CHECK: Name: .rela.text
|
||||
@ -38,6 +38,7 @@ bar:
|
||||
// CHECK-NEXT: 0x55 R_X86_64_PC32 foo 0xFFFFFFFFFFFFFFFC
|
||||
// CHECK-NEXT: 0x5C R_X86_64_PC32 foo 0x5C
|
||||
// CHECK-NEXT: 0x63 R_X86_64_32S .text 0x0
|
||||
// CHECK-NEXT: 0x67 R_X86_64_DTPOFF64 foo 0x0
|
||||
// CHECK-NEXT: ]
|
||||
// CHECK-NEXT: }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user