[lld] r252685 - [elf2][x86-64] Add support for DTPOFF64
Michael J. Spencer via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 10 17:28:11 PST 2015
Author: mspencer
Date: Tue Nov 10 19:28:11 2015
New Revision: 252685
URL: http://llvm.org/viewvc/llvm-project?rev=252685&view=rev
Log:
[elf2][x86-64] Add support for DTPOFF64
Modified:
lld/trunk/ELF/Target.cpp
lld/trunk/test/elf2/tls-dynamic.s
Modified: lld/trunk/ELF/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=252685&r1=252684&r2=252685&view=diff
==============================================================================
--- lld/trunk/ELF/Target.cpp (original)
+++ lld/trunk/ELF/Target.cpp Tue Nov 10 19:28:11 2015
@@ -323,6 +323,7 @@ bool X86_64TargetInfo::isRelRelative(uin
case R_X86_64_PC8:
case R_X86_64_PLT32:
case R_X86_64_DTPOFF32:
+ case R_X86_64_DTPOFF64:
return true;
}
}
@@ -337,6 +338,7 @@ void X86_64TargetInfo::relocateOne(uint8
write32le(Loc, SA - P);
break;
case R_X86_64_64:
+ case R_X86_64_DTPOFF64:
write64le(Loc, SA);
break;
case R_X86_64_32:
Modified: lld/trunk/test/elf2/tls-dynamic.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/tls-dynamic.s?rev=252685&r1=252684&r2=252685&view=diff
==============================================================================
--- lld/trunk/test/elf2/tls-dynamic.s (original)
+++ lld/trunk/test/elf2/tls-dynamic.s Tue Nov 10 19:28:11 2015
@@ -10,6 +10,7 @@
callq __tls_get_addr at PLT
leaq a at dtpoff(%rax), %rcx
leaq b at dtpoff(%rax), %rcx
+ .long b at dtpoff, 0
.global a
.hidden a
@@ -54,3 +55,7 @@ b:
// DIS-NEXT: 1013: {{.+}} callq
// DIS-NEXT: 1018: {{.+}} leaq (%rax), %rcx
// DIS-NEXT: 101f: {{.+}} leaq 4(%rax), %rcx
+// DIS-NEXT: 1026: 04 00
+// DIS-NEXT: 1028: 00 00
+// DIS-NEXT: 102a: 00 00
+// DIS-NEXT: 102c: 00 00
More information about the llvm-commits
mailing list