tlsbin2.dd 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. #source: tlsbinpic2.s
  2. #source: tlsbin.s
  3. #as: --64
  4. #ld: -shared -melf_x86_64 --no-ld-generated-unwind-info
  5. #objdump: -drj.text
  6. #target: x86_64-*-*
  7. # PT_TLS layout is:
  8. # Offset from Offset from Name
  9. # TCB base TCB end
  10. # 0x00 -0xa0 sg1..sg8
  11. # 0x20 -0x80 sl1..sl8
  12. # 0x40 -0x60 sh1..sh8
  13. # 0x60 -0x40 bg1..bg8
  14. # 0x80 -0x20 bl1..bl8
  15. .*: +file format elf64-x86-64.*
  16. Disassembly of section .text:
  17. [0-9a-f]+ <fn2>:
  18. +[0-9a-f]+: 55[ ]+push %rbp
  19. +[0-9a-f]+: 48 89 e5[ ]+mov %rsp,%rbp
  20. # GD -> IE because variable is not defined in executable
  21. +[0-9a-f]+: 64 48 8b 04 25 00 00[ ]+mov %fs:0x0,%rax
  22. +[0-9a-f]+: 00 00 *
  23. +[0-9a-f]+: 48 03 05 ([0-9a-f]{2} ){4}[ ]+add 0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <.*>
  24. # -> R_X86_64_TPOFF64 sG1
  25. +[0-9a-f]+: 90[ ]+nop *
  26. +[0-9a-f]+: 90[ ]+nop *
  27. +[0-9a-f]+: 90[ ]+nop *
  28. +[0-9a-f]+: 90[ ]+nop *
  29. # GD -> IE because variable is not defined in executable where
  30. # the variable is referenced through IE too
  31. +[0-9a-f]+: 64 48 8b 04 25 00 00[ ]+mov %fs:0x0,%rax
  32. +[0-9a-f]+: 00 00 *
  33. +[0-9a-f]+: 48 03 05 ([0-9a-f]{2} ){4}[ ]+add 0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <.*>
  34. # -> R_X86_64_TPOFF64 sG2
  35. +[0-9a-f]+: 90[ ]+nop *
  36. +[0-9a-f]+: 90[ ]+nop *
  37. +[0-9a-f]+: 90[ ]+nop *
  38. +[0-9a-f]+: 90[ ]+nop *
  39. # GD -> LE with global variable defined in executable
  40. +[0-9a-f]+: 64 48 8b 04 25 00 00[ ]+mov %fs:0x0,%rax
  41. +[0-9a-f]+: 00 00 *
  42. +[0-9a-f]+: 48 8d 80 60 ff ff ff[ ]+lea -0xa0\(%rax\),%rax
  43. # sg1
  44. +[0-9a-f]+: 90[ ]+nop *
  45. +[0-9a-f]+: 90[ ]+nop *
  46. +[0-9a-f]+: 90[ ]+nop *
  47. +[0-9a-f]+: 90[ ]+nop *
  48. # GD -> LE with local variable defined in executable
  49. +[0-9a-f]+: 64 48 8b 04 25 00 00[ ]+mov %fs:0x0,%rax
  50. +[0-9a-f]+: 00 00 *
  51. +[0-9a-f]+: 48 8d 80 80 ff ff ff[ ]+lea -0x80\(%rax\),%rax
  52. # sl1
  53. +[0-9a-f]+: 90[ ]+nop *
  54. +[0-9a-f]+: 90[ ]+nop *
  55. +[0-9a-f]+: 90[ ]+nop *
  56. +[0-9a-f]+: 90[ ]+nop *
  57. # GD -> LE with hidden variable defined in executable
  58. +[0-9a-f]+: 64 48 8b 04 25 00 00[ ]+mov %fs:0x0,%rax
  59. +[0-9a-f]+: 00 00 *
  60. +[0-9a-f]+: 48 8d 80 a0 ff ff ff[ ]+lea -0x60\(%rax\),%rax
  61. # sh1
  62. +[0-9a-f]+: 90[ ]+nop *
  63. +[0-9a-f]+: 90[ ]+nop *
  64. +[0-9a-f]+: 90[ ]+nop *
  65. +[0-9a-f]+: 90[ ]+nop *
  66. # LD -> LE
  67. +[0-9a-f]+: 66 66 66 66 64 48 8b[ ]+data16 data16 data16 data16 mov %fs:0x0,%rax
  68. +[0-9a-f]+: 04 25 00 00 00 00 *
  69. +[0-9a-f]+: 90[ ]+nop *
  70. +[0-9a-f]+: 90[ ]+nop *
  71. +[0-9a-f]+: 48 8d 90 81 ff ff ff[ ]+lea -0x7f\(%rax\),%rdx
  72. # sl1+1
  73. +[0-9a-f]+: 90[ ]+nop *
  74. +[0-9a-f]+: 90[ ]+nop *
  75. +[0-9a-f]+: 4c 8d 88 86 ff ff ff[ ]+lea -0x7a\(%rax\),%r9
  76. # sl2+2
  77. +[0-9a-f]+: 90[ ]+nop *
  78. +[0-9a-f]+: 90[ ]+nop *
  79. +[0-9a-f]+: 90[ ]+nop *
  80. +[0-9a-f]+: 90[ ]+nop *
  81. # LD -> LE against hidden variables
  82. +[0-9a-f]+: 66 66 66 66 64 48 8b[ ]+data16 data16 data16 data16 mov %fs:0x0,%rax
  83. +[0-9a-f]+: 04 25 00 00 00 00 *
  84. +[0-9a-f]+: 90[ ]+nop *
  85. +[0-9a-f]+: 90[ ]+nop *
  86. +[0-9a-f]+: 48 8d 90 a0 ff ff ff[ ]+lea -0x60\(%rax\),%rdx
  87. # sh1
  88. +[0-9a-f]+: 90[ ]+nop *
  89. +[0-9a-f]+: 90[ ]+nop *
  90. +[0-9a-f]+: 48 8d 88 a7 ff ff ff[ ]+lea -0x59\(%rax\),%rcx
  91. # sh2+3
  92. +[0-9a-f]+: 90[ ]+nop *
  93. +[0-9a-f]+: 90[ ]+nop *
  94. +[0-9a-f]+: 90[ ]+nop *
  95. +[0-9a-f]+: 90[ ]+nop *
  96. # IE against global var
  97. +[0-9a-f]+: 64 4c 8b 0c 25 00 00[ ]+mov %fs:0x0,%r9
  98. +[0-9a-f]+: 00 00 *
  99. +[0-9a-f]+: 90[ ]+nop *
  100. +[0-9a-f]+: 90[ ]+nop *
  101. +[0-9a-f]+: 4c 03 0d ([0-9a-f]{2} ){4}[ ]+add 0x[0-9a-f]+\(%rip\),%r9 +# [0-9a-f]+ <.*>
  102. # -> R_X86_64_TPOFF64 sG2
  103. +[0-9a-f]+: 90[ ]+nop *
  104. +[0-9a-f]+: 90[ ]+nop *
  105. +[0-9a-f]+: 90[ ]+nop *
  106. +[0-9a-f]+: 90[ ]+nop *
  107. # IE -> LE against global var defined in exec
  108. +[0-9a-f]+: 64 4c 8b 14 25 00 00[ ]+mov %fs:0x0,%r10
  109. +[0-9a-f]+: 00 00 *
  110. +[0-9a-f]+: 90[ ]+nop *
  111. +[0-9a-f]+: 90[ ]+nop *
  112. +[0-9a-f]+: 4d 8d 92 60 ff ff ff[ ]+lea -0xa0\(%r10\),%r10
  113. # sg1
  114. +[0-9a-f]+: 90[ ]+nop *
  115. +[0-9a-f]+: 90[ ]+nop *
  116. +[0-9a-f]+: 90[ ]+nop *
  117. +[0-9a-f]+: 90[ ]+nop *
  118. # IE -> LE against local var
  119. +[0-9a-f]+: 64 48 8b 04 25 00 00[ ]+mov %fs:0x0,%rax
  120. +[0-9a-f]+: 00 00 *
  121. +[0-9a-f]+: 90[ ]+nop *
  122. +[0-9a-f]+: 90[ ]+nop *
  123. +[0-9a-f]+: 48 8d 80 80 ff ff ff[ ]+lea -0x80\(%rax\),%rax
  124. # sl1
  125. +[0-9a-f]+: 90[ ]+nop *
  126. +[0-9a-f]+: 90[ ]+nop *
  127. +[0-9a-f]+: 90[ ]+nop *
  128. +[0-9a-f]+: 90[ ]+nop *
  129. # IE -> LE against hidden var
  130. +[0-9a-f]+: 64 48 8b 0c 25 00 00[ ]+mov %fs:0x0,%rcx
  131. +[0-9a-f]+: 00 00 *
  132. +[0-9a-f]+: 90[ ]+nop *
  133. +[0-9a-f]+: 90[ ]+nop *
  134. +[0-9a-f]+: 48 8d 89 a0 ff ff ff[ ]+lea -0x60\(%rcx\),%rcx
  135. # sh1
  136. +[0-9a-f]+: 90[ ]+nop *
  137. +[0-9a-f]+: 90[ ]+nop *
  138. +[0-9a-f]+: 90[ ]+nop *
  139. +[0-9a-f]+: 90[ ]+nop *
  140. # Direct access through %fs
  141. # IE against global var
  142. +[0-9a-f]+: 48 8b 0d ([0-9a-f]{2} ){4}[ ]+mov 0x[0-9a-f]+\(%rip\),%rcx +# [0-9a-f]+ <.*>
  143. # -> R_X86_64_TPOFF64 sG5
  144. +[0-9a-f]+: 90[ ]+nop *
  145. +[0-9a-f]+: 90[ ]+nop *
  146. +[0-9a-f]+: 64 48 8b 11[ ]+mov %fs:\(%rcx\),%rdx
  147. +[0-9a-f]+: 90[ ]+nop *
  148. +[0-9a-f]+: 90[ ]+nop *
  149. +[0-9a-f]+: 90[ ]+nop *
  150. +[0-9a-f]+: 90[ ]+nop *
  151. # IE->LE against local var
  152. +[0-9a-f]+: 49 c7 c3 90 ff ff ff[ ]+mov \$0xf+90,%r11
  153. # sl5
  154. +[0-9a-f]+: 90[ ]+nop *
  155. +[0-9a-f]+: 90[ ]+nop *
  156. +[0-9a-f]+: 64 4d 8b 23[ ]+mov %fs:\(%r11\),%r12
  157. +[0-9a-f]+: 90[ ]+nop *
  158. +[0-9a-f]+: 90[ ]+nop *
  159. +[0-9a-f]+: 90[ ]+nop *
  160. +[0-9a-f]+: 90[ ]+nop *
  161. # IE->LE against hidden var
  162. +[0-9a-f]+: 48 c7 c2 b0 ff ff ff[ ]+mov \$0xf+b0,%rdx
  163. +[0-9a-f]+: 90[ ]+nop *
  164. +[0-9a-f]+: 90[ ]+nop *
  165. +[0-9a-f]+: 64 48 8b 12[ ]+mov %fs:\(%rdx\),%rdx
  166. # sh5
  167. +[0-9a-f]+: 90[ ]+nop *
  168. +[0-9a-f]+: 90[ ]+nop *
  169. +[0-9a-f]+: 90[ ]+nop *
  170. +[0-9a-f]+: 90[ ]+nop *
  171. +[0-9a-f]+: c9[ ]+leave *
  172. +[0-9a-f]+: c3[ ]+ret *
  173. [0-9a-f]+ <_start>:
  174. +[0-9a-f]+: 55[ ]+push %rbp
  175. +[0-9a-f]+: 48 89 e5[ ]+mov %rsp,%rbp
  176. # IE against global var
  177. +[0-9a-f]+: 64 4c 8b 1c 25 00 00[ ]+mov %fs:0x0,%r11
  178. +[0-9a-f]+: 00 00 *
  179. +[0-9a-f]+: 90[ ]+nop *
  180. +[0-9a-f]+: 90[ ]+nop *
  181. +[0-9a-f]+: 4c 03 1d ([0-9a-f]{2} ){4}[ ]+add 0x[0-9a-f]+\(%rip\),%r11 +# [0-9a-f]+ <.*>
  182. # -> R_X86_64_TPOFF64 sG6
  183. +[0-9a-f]+: 90[ ]+nop *
  184. +[0-9a-f]+: 90[ ]+nop *
  185. +[0-9a-f]+: 90[ ]+nop *
  186. +[0-9a-f]+: 90[ ]+nop *
  187. # IE -> LE against global var defined in exec
  188. +[0-9a-f]+: 64 48 8b 14 25 00 00[ ]+mov %fs:0x0,%rdx
  189. +[0-9a-f]+: 00 00 *
  190. +[0-9a-f]+: 90[ ]+nop *
  191. +[0-9a-f]+: 90[ ]+nop *
  192. +[0-9a-f]+: 48 8d 92 d4 ff ff ff[ ]+lea -0x2c\(%rdx\),%rdx
  193. # bg6
  194. +[0-9a-f]+: 90[ ]+nop *
  195. +[0-9a-f]+: 90[ ]+nop *
  196. +[0-9a-f]+: 90[ ]+nop *
  197. +[0-9a-f]+: 90[ ]+nop *
  198. # IE -> LE against local var
  199. +[0-9a-f]+: 64 4c 8b 24 25 00 00[ ]+mov %fs:0x0,%r12
  200. +[0-9a-f]+: 00 00 *
  201. +[0-9a-f]+: 90[ ]+nop *
  202. +[0-9a-f]+: 90[ ]+nop *
  203. +[0-9a-f]+: 49 81 c4 f4 ff ff ff[ ]+add \$0xf+f4,%r12
  204. # bl6
  205. +[0-9a-f]+: 90[ ]+nop *
  206. +[0-9a-f]+: 90[ ]+nop *
  207. +[0-9a-f]+: 90[ ]+nop *
  208. +[0-9a-f]+: 90[ ]+nop *
  209. # direct %fs access IE -> LE against local var
  210. +[0-9a-f]+: 48 c7 c2 fc ff ff ff[ ]+mov \$0xf+fc,%rdx
  211. # bl8
  212. +[0-9a-f]+: 90[ ]+nop *
  213. +[0-9a-f]+: 90[ ]+nop *
  214. +[0-9a-f]+: 64 48 8b 02[ ]+mov %fs:\(%rdx\),%rax
  215. +[0-9a-f]+: 90[ ]+nop *
  216. +[0-9a-f]+: 90[ ]+nop *
  217. +[0-9a-f]+: 90[ ]+nop *
  218. +[0-9a-f]+: 90[ ]+nop *
  219. # IE -> LE against hidden but not local var
  220. +[0-9a-f]+: 64 48 8b 14 25 00 00[ ]+mov %fs:0x0,%rdx
  221. +[0-9a-f]+: 00 00 *
  222. +[0-9a-f]+: 90[ ]+nop *
  223. +[0-9a-f]+: 90[ ]+nop *
  224. +[0-9a-f]+: 48 8d 92 b4 ff ff ff[ ]+lea -0x4c\(%rdx\),%rdx
  225. # sh6
  226. +[0-9a-f]+: 90[ ]+nop *
  227. +[0-9a-f]+: 90[ ]+nop *
  228. +[0-9a-f]+: 90[ ]+nop *
  229. +[0-9a-f]+: 90[ ]+nop *
  230. # direct %fs access IE -> LE against hidden but not local var
  231. +[0-9a-f]+: 48 c7 c2 bc ff ff ff[ ]+mov \$0xf+bc,%rdx
  232. # sh8
  233. +[0-9a-f]+: 90[ ]+nop *
  234. +[0-9a-f]+: 90[ ]+nop *
  235. +[0-9a-f]+: 64 48 8b 02[ ]+mov %fs:\(%rdx\),%rax
  236. +[0-9a-f]+: 90[ ]+nop *
  237. +[0-9a-f]+: 90[ ]+nop *
  238. +[0-9a-f]+: 90[ ]+nop *
  239. +[0-9a-f]+: 90[ ]+nop *
  240. # LE, global var defined in exec
  241. +[0-9a-f]+: 64 48 8b 04 25 00 00[ ]+mov %fs:0x0,%rax
  242. +[0-9a-f]+: 00 00 *
  243. +[0-9a-f]+: 90[ ]+nop *
  244. +[0-9a-f]+: 90[ ]+nop *
  245. +[0-9a-f]+: 48 8d 90 64 ff ff ff[ ]+lea -0x9c\(%rax\),%rdx
  246. # sg2
  247. +[0-9a-f]+: 90[ ]+nop *
  248. +[0-9a-f]+: 90[ ]+nop *
  249. +[0-9a-f]+: 90[ ]+nop *
  250. +[0-9a-f]+: 90[ ]+nop *
  251. # LE, local var, non-canonical sequence
  252. +[0-9a-f]+: 49 c7 c1 e6 ff ff ff[ ]+mov \$0xf+e6,%r9
  253. # bl2+2
  254. +[0-9a-f]+: 90[ ]+nop *
  255. +[0-9a-f]+: 90[ ]+nop *
  256. +[0-9a-f]+: 64 48 8b 14 25 00 00[ ]+mov %fs:0x0,%rdx
  257. +[0-9a-f]+: 00 00 *
  258. +[0-9a-f]+: 90[ ]+nop *
  259. +[0-9a-f]+: 90[ ]+nop *
  260. +[0-9a-f]+: 4c 01 ca[ ]+add %r9,%rdx
  261. +[0-9a-f]+: 90[ ]+nop *
  262. +[0-9a-f]+: 90[ ]+nop *
  263. +[0-9a-f]+: 90[ ]+nop *
  264. +[0-9a-f]+: 90[ ]+nop *
  265. # LE, hidden var defined in exec, non-canonical sequence
  266. +[0-9a-f]+: 64 48 8b 14 25 00 00[ ]+mov %fs:0x0,%rdx
  267. +[0-9a-f]+: 00 00 *
  268. +[0-9a-f]+: 90[ ]+nop *
  269. +[0-9a-f]+: 90[ ]+nop *
  270. +[0-9a-f]+: 48 81 c2 a5 ff ff ff[ ]+add \$0xf+a5,%rdx
  271. # sh2+1
  272. +[0-9a-f]+: 90[ ]+nop *
  273. +[0-9a-f]+: 90[ ]+nop *
  274. +[0-9a-f]+: 90[ ]+nop *
  275. +[0-9a-f]+: 90[ ]+nop *
  276. # Direct %fs access
  277. # LE, global var defined in exec
  278. +[0-9a-f]+: 64 48 8b 04 25 68 ff[ ]+mov %fs:0xf+68,%rax
  279. +[0-9a-f]+: ff ff *
  280. # sg3
  281. +[0-9a-f]+: 90[ ]+nop *
  282. +[0-9a-f]+: 90[ ]+nop *
  283. +[0-9a-f]+: 90[ ]+nop *
  284. +[0-9a-f]+: 90[ ]+nop *
  285. # LE, local var
  286. +[0-9a-f]+: 64 4c 8b 14 25 eb ff[ ]+mov %fs:0xf+eb,%r10
  287. +[0-9a-f]+: ff ff *
  288. # bl3+3
  289. +[0-9a-f]+: 90[ ]+nop *
  290. +[0-9a-f]+: 90[ ]+nop *
  291. +[0-9a-f]+: 90[ ]+nop *
  292. +[0-9a-f]+: 90[ ]+nop *
  293. # LE, hidden var defined in exec
  294. +[0-9a-f]+: 64 48 8b 14 25 a9 ff[ ]+mov %fs:0xf+a9,%rdx
  295. +[0-9a-f]+: ff ff *
  296. # sh3+1
  297. +[0-9a-f]+: 90[ ]+nop *
  298. +[0-9a-f]+: 90[ ]+nop *
  299. +[0-9a-f]+: 90[ ]+nop *
  300. +[0-9a-f]+: 90[ ]+nop *
  301. # LE, large model
  302. +[0-9a-f]+: 48 ba a5 ff ff ff ff[ ]+movabs \$0xffffffffffffffa5,%rdx
  303. +[0-9a-f]+: ff ff ff *
  304. +[0-9a-f]+: c9[ ]+leave *
  305. +[0-9a-f]+: c3[ ]+ret *