1.syntax unified 2 3.text 4.global __tlsdesc_static 5.hidden __tlsdesc_static 6.type __tlsdesc_static,%function 7__tlsdesc_static: 8 ldr r0,[r0] 9 bx lr 10 11.global __tlsdesc_dynamic 12.hidden __tlsdesc_dynamic 13.type __tlsdesc_dynamic,%function 14__tlsdesc_dynamic: 15 push {r2,r3,ip,lr} 16 ldr r1,[r0] 17 ldr r2,[r1,#4] // r2 = offset 18 ldr r1,[r1] // r1 = modid 19 20#if ((__ARM_ARCH_6K__ || __ARM_ARCH_6KZ__ || __ARM_ARCH_6ZK__) && !__thumb__) \ 21 || __ARM_ARCH_7A__ || __ARM_ARCH_7R__ || __ARM_ARCH >= 7 22 mrc p15,0,r0,c13,c0,3 23#else 24 ldr r0,1f 25 add r0,r0,pc 26 ldr r0,[r0] 272: 28#if __ARM_ARCH >= 5 29 blx r0 // r0 = tp 30#else 31#if __thumb__ 32 add lr,pc,#1 33#else 34 mov lr,pc 35#endif 36 bx r0 37#endif 38#endif 39 ldr r3,[r0,#-4] // r3 = dtv 40 ldr ip,[r3,r1,LSL #2] 41 sub r0,ip,r0 42 add r0,r0,r2 // r0 = r3[r1]-r0+r2 43#if __ARM_ARCH >= 5 44 pop {r2,r3,ip,pc} 45#else 46 pop {r2,r3,ip,lr} 47 bx lr 48#endif 49 50#if ((__ARM_ARCH_6K__ || __ARM_ARCH_6KZ__ || __ARM_ARCH_6ZK__) && !__thumb__) \ 51 || __ARM_ARCH_7A__ || __ARM_ARCH_7R__ || __ARM_ARCH >= 7 52#else 53 .align 2 541: .word __a_gettp_ptr - 2b 55#endif 56