1 .section ".tdata", "awT", @progbits 2 .global sg1, sg2, sg3, sg4, sg5, sg6, sg7, sg8 3 .global sh1, sh2, sh3, sh4, sh5, sh6, sh7, sh8 4 .hidden sh1, sh2, sh3, sh4, sh5, sh6, sh7, sh8 5 .align 4 6sg1: .long 17 7sg2: .long 18 8sg3: .long 19 9sg4: .long 20 10sg5: .long 21 11sg6: .long 22 12sg7: .long 23 13sg8: .long 24 14sl1: .long 65 15sl2: .long 66 16sl3: .long 67 17sl4: .long 68 18sl5: .long 69 19sl6: .long 70 20sl7: .long 71 21sl8: .long 72 22sh1: .long 157 23sh2: .long 158 24sh3: .long 159 25sh4: .long 160 26sh5: .long 161 27sh6: .long 162 28sh7: .long 163 29sh8: .long 164 30 31 .text 32 .global _start 33 .type _start, @function 34_start: 35 entry sp, 32 36 37 /* GD -> IE because variable is not defined in executable */ 38 movi a8, sG1@tlsfunc 39 movi a10, sG1@tlsarg 40 callx8.tls a8, sG1@tlscall 41 42 /* GD -> IE because variable is not defined in executable where 43 the variable is referenced through IE too */ 44 movi a8, sG2@tlsfunc 45 movi a10, sG2@tlsarg 46 callx8.tls a8, sG2@tlscall 47 48 /* GD -> LE with global variable defined in executable */ 49 movi a8, sg1@tlsfunc 50 movi a10, sg1@tlsarg 51 callx8.tls a8, sg1@tlscall 52 53 /* GD -> LE with local variable defined in executable */ 54 movi a8, sl1@tlsfunc 55 movi a10, sl1@tlsarg 56 callx8.tls a8, sl1@tlscall 57 58 /* GD -> LE with hidden variable defined in executable */ 59 movi a8, sh1@tlsfunc 60 movi a10, sh1@tlsarg 61 callx8.tls a8, sh1@tlscall 62 63 /* LD -> LE */ 64 movi a8, _TLS_MODULE_BASE_@tlsfunc 65 movi a10, _TLS_MODULE_BASE_@tlsarg 66 callx8.tls a8, _TLS_MODULE_BASE_@tlscall 67 movi a12, 1+sl1@dtpoff 68 add a12, a12, a10 69 movi a13, sl2@dtpoff+2 70 add a13, a13, a10 71 72 /* LD -> LE against hidden variables */ 73 movi a12, sh1@dtpoff 74 add a12, a12, a10 75 movi a13, 3+sh2@dtpoff 76 add a13, a13, a10 77 78 /* IE against global var */ 79 rur a2, THREADPTR 80 movi a3, sG2@tpoff 81 add a3, a3, a2 82 83 /* IE -> LE against global var defined in exec */ 84 rur a4, THREADPTR 85 movi a5, sg1@tpoff 86 add a5, a5, a4 87 88 /* IE -> LE against local var */ 89 rur a6, THREADPTR 90 movi a7, sl1@tpoff 91 add a7, a7, a6 92 93 /* IE -> LE against hidden var */ 94 rur a8, THREADPTR 95 movi a9, sh1@tpoff 96 add a9, a9, a8 97 98 retw 99