github.com/afumu/libc@v0.0.6/musl/src/ldso/x86_64/tlsdesc.s (about)

     1  .text
     2  .global __tlsdesc_static
     3  .hidden __tlsdesc_static
     4  .type __tlsdesc_static,@function
     5  __tlsdesc_static:
     6  	mov 8(%rax),%rax
     7  	ret
     8  
     9  .global __tlsdesc_dynamic
    10  .hidden __tlsdesc_dynamic
    11  .type __tlsdesc_dynamic,@function
    12  __tlsdesc_dynamic:
    13  	mov 8(%rax),%rax
    14  	push %rdx
    15  	mov %fs:8,%rdx
    16  	push %rcx
    17  	mov (%rax),%rcx
    18  	mov 8(%rax),%rax
    19  	add (%rdx,%rcx,8),%rax
    20  	pop %rcx
    21  	sub %fs:0,%rax
    22  	pop %rdx
    23  	ret