1 .text 2 .p2align 4,,15 3 .globl get_ld 4 .type get_ld, @function 5get_ld: 6 subq $8, %rsp 7 leaq _TLS_MODULE_BASE_@TLSDESC(%rip), %rax 8 call *_TLS_MODULE_BASE_@TLSCALL(%rax) 9 addq $8, %rsp 10 addq $ld@dtpoff, %rax 11 addq %fs:0, %rax 12 ret 13 .size get_ld, .-get_ld 14 .p2align 4,,15 15 .globl set_ld 16 .type set_ld, @function 17set_ld: 18 subq $8, %rsp 19 leaq _TLS_MODULE_BASE_@TLSDESC(%rip), %rax 20 call *_TLS_MODULE_BASE_@TLSCALL(%rax) 21 movl %edi, %fs:ld@dtpoff(%rax) 22 addq $8, %rsp 23 ret 24 .size set_ld, .-set_ld 25 .p2align 4,,15 26 .globl test_ld 27 .type test_ld, @function 28test_ld: 29 subq $8, %rsp 30 leaq _TLS_MODULE_BASE_@TLSDESC(%rip), %rax 31 call *_TLS_MODULE_BASE_@TLSCALL(%rax) 32 cmpl %edi, %fs:ld@dtpoff(%rax) 33 sete %al 34 addq $8, %rsp 35 movzbl %al, %eax 36 ret 37 .size test_ld, .-test_ld 38 .p2align 4,,15 39 .globl get_gd 40 .type get_gd, @function 41get_gd: 42 subq $8, %rsp 43 leaq gd@TLSDESC(%rip), %rax 44 call *gd@TLSCALL(%rax) 45 addq $8, %rsp 46 addq %fs:0, %rax 47 ret 48 .size get_gd, .-get_gd 49 .p2align 4,,15 50 .globl set_gd 51 .type set_gd, @function 52set_gd: 53 subq $8, %rsp 54 leaq gd@TLSDESC(%rip), %rax 55 call *gd@TLSCALL(%rax) 56 movl %edi, %fs:(%rax) 57 addq $8, %rsp 58 ret 59 .size set_gd, .-set_gd 60 .p2align 4,,15 61 .globl test_gd 62 .type test_gd, @function 63test_gd: 64 subq $8, %rsp 65 leaq gd@TLSDESC(%rip), %rax 66 call *gd@TLSCALL(%rax) 67 cmpl %edi, %fs:(%rax) 68 sete %al 69 addq $8, %rsp 70 movzbl %al, %eax 71 ret 72 .size test_gd, .-test_gd 73 .section .tbss,"awT",@nobits 74 .align 4 75 .type ld, @object 76 .size ld, 4 77ld: 78 .zero 4 79