Add support for R_X86_64_DTPOFF64.

It is used by clang to produce debug info for tls variables.

llvm-svn: 260384
This commit is contained in:
Rafael Espindola 2016-02-10 16:26:31 +00:00
parent fc3bf1f526
commit 96449907a5
2 changed files with 9 additions and 0 deletions

View File

@ -872,6 +872,9 @@ void X86_64TargetInfo::relocateOne(uint8_t *Loc, uint8_t *BufEnd, uint32_t Type,
case R_X86_64_DTPOFF32:
write32le(Loc, SA);
break;
case R_X86_64_DTPOFF64:
write64le(Loc, SA);
break;
case R_X86_64_GOTPCREL:
case R_X86_64_PC32:
case R_X86_64_PLT32:

View File

@ -18,6 +18,9 @@
// Initial Exec Model Code Sequence, II
movq c@gottpoff(%rip),%rax
movq %fs:(%rax),%rax
movabs $a@dtpoff, %rax
movabs $b@dtpoff, %rax
movabs $c@dtpoff, %rax
.global a
.hidden a
@ -79,3 +82,6 @@ c:
// DIS-NEXT: 103b: {{.+}} leaq 8(%rax), %rcx
// DIS-NEXT: 1042: {{.+}} movq 4263(%rip), %rax
// DIS-NEXT: 1049: {{.+}} movq %fs:(%rax), %rax
// DIS-NEXT: 104d: {{.+}} movabsq $0, %rax
// DIS-NEXT: 1057: {{.+}} movabsq $4, %rax
// DIS-NEXT: 1061: {{.+}} movabsq $8, %rax