cranelift: Add COFF TLS Support (#4546)
* cranelift: Implement COFF TLS Relocations * cranelift: Emit SecRel relocations * cranelift: Handle _tls_index symbol in backend
This commit is contained in:
20
cranelift/filetests/filetests/isa/x64/tls_coff.clif
Normal file
20
cranelift/filetests/filetests/isa/x64/tls_coff.clif
Normal file
@@ -0,0 +1,20 @@
|
||||
test compile precise-output
|
||||
set tls_model=coff
|
||||
target x86_64
|
||||
|
||||
|
||||
function u0:0(i32) -> i64 {
|
||||
gv0 = symbol colocated tls u1:0
|
||||
|
||||
block0(v0: i32):
|
||||
v1 = global_value.i64 gv0
|
||||
return v1
|
||||
}
|
||||
|
||||
; pushq %rbp
|
||||
; movq %rsp, %rbp
|
||||
; block0:
|
||||
; %rax = coff_tls_get_addr User { namespace: 1, index: 0 }
|
||||
; movq %rbp, %rsp
|
||||
; popq %rbp
|
||||
; ret
|
||||
Reference in New Issue
Block a user