install dynamic tls synchronously at dlopen, streamline access
[musl] / src / ldso / i386 / tlsdesc.s
1 .text
2 .global __tlsdesc_static
3 .hidden __tlsdesc_static
4 .type __tlsdesc_static,@function
5 __tlsdesc_static:
6         mov 4(%eax),%eax
7         ret
8
9 .hidden __tls_get_new
10
11 .global __tlsdesc_dynamic
12 .hidden __tlsdesc_dynamic
13 .type __tlsdesc_dynamic,@function
14 __tlsdesc_dynamic:
15         mov 4(%eax),%eax
16         push %edx
17         mov %gs:4,%edx
18         push %ecx
19         mov (%eax),%ecx
20         mov 4(%eax),%eax
21         add (%edx,%ecx,4),%eax
22         pop %ecx
23         sub %gs:0,%eax
24         pop %edx
25         ret