1 #source: tlspie2.s
2 #as: --64 -mrelax-relocations=yes
3 #ld: -melf_x86_64 -pie -z call-nop=suffix-nop
4 #objdump: -dwr
5 
6 .*: +file format .*
7 
8 
9 Disassembly of section .text:
10 
11 [a-f0-9]+ <__tls_get_addr>:
12 [ 	]*[a-f0-9]+:	c3                   	retq
13 
14 [a-f0-9]+ <_start>:
15 [ 	]*[a-f0-9]+:	48 c7 c0 f4 ff ff ff 	mov    \$0xfffffffffffffff4,%rax
16 [ 	]*[a-f0-9]+:	53                   	push   %rbx
17 [ 	]*[a-f0-9]+:	64 8b 1c 25 f0 ff ff ff 	mov    %fs:0xfffffffffffffff0,%ebx
18 [ 	]*[a-f0-9]+:	64 03 1c 25 ec ff ff ff 	add    %fs:0xffffffffffffffec,%ebx
19 [ 	]*[a-f0-9]+:	64 03 18             	add    %fs:\(%rax\),%ebx
20 [ 	]*[a-f0-9]+:	66 66 66 66 64 48 8b 04 25 00 00 00 00 	data16 data16 data16 data16 mov %fs:0x0,%rax
21 [ 	]*[a-f0-9]+:	03 98 f8 ff ff ff    	add    -0x8\(%rax\),%ebx
22 [ 	]*[a-f0-9]+:	64 48 8b 04 25 00 00 00 00 	mov    %fs:0x0,%rax
23 [ 	]*[a-f0-9]+:	48 8d 80 fc ff ff ff 	lea    -0x4\(%rax\),%rax
24 [ 	]*[a-f0-9]+:	03 18                	add    \(%rax\),%ebx
25 [ 	]*[a-f0-9]+:	89 d8                	mov    %ebx,%eax
26 [ 	]*[a-f0-9]+:	5b                   	pop    %rbx
27 [ 	]*[a-f0-9]+:	c3                   	retq
28 #pass
29