1 .global tlsdescvar 2 .section .tbss,"awT",%nobits 3 .align 2 4 .type tlsdescvar, %object 5 .size tlsdescvar, 4 6tlsdescvar: 7 .zero 4 8 9 .align 2 10 .type l_tlsdescvar, %object 11 .size l_tlsdescvar, 4 12l_tlsdescvar: 13 .zero 4 14.text 15_test_tls_desc: 16 17 // R_AARCH64_TLSDESC_ADR_PAGE tlsdescvar 18 adrp x0, :tlsdesc:tlsdescvar 19 // R_AARCH64_TLSDESC_LD64_LO12 tlsdescvar 20 ldr x1, [x0, :tlsdesc_lo12:tlsdescvar] 21 // R_AARCH64_TLSDESC_ADD_LO12 tlsdescvar 22 add x0, x0, :tlsdesc_lo12:tlsdescvar 23 // R_AARCH64_TLSDESC_CALL tlsdescvar 24 .tlsdesccall tlsdescvar 25 blr x1 26 27_test_tls_desc_local: 28 29 // R_AARCH64_TLSDESC_ADR_PAGE l_tlsdescvar 30 adrp x0, :tlsdesc:l_tlsdescvar 31 // R_AARCH64_TLSDESC_LD64_LO12 l_tlsdescvar 32 ldr x1, [x0, :tlsdesc_lo12:l_tlsdescvar] 33 // R_AARCH64_TLSDESC_ADD_LO12 l_tlsdescvar 34 add x0, x0, :tlsdesc_lo12:l_tlsdescvar 35 // R_AARCH64_TLSDESC_CALL l_tlsdescvar 36 .tlsdesccall l_tlsdescvar 37 blr x1 38 39