2 // RUN
: llvm-mc
-filetype
=obj
-triple
=i686
%s
-o
%t.o
3 // RUN
: ld.lld
%t.o
-o
%t1
4 // RUN
: llvm-readobj
-r
%t1 | FileCheck
--check-prefix
=NORELOC
%s
5 // RUN
: llvm-objdump
--no-print-imm-hex
-d
--no-show-raw-insn
%t1 | FileCheck
--check-prefix
=DISASM
%s
7 // NORELOC
: Relocations
[
10 // DISASM
: Disassembly of section
.text:
12 // DISASM-NEXT
: <_start
>:
14 // DISASM-NEXT
: movl
%gs
:0, %eax
16 // DISASM-NEXT
: leal
(%esi
,%eiz
), %esi
17 // DISASM-NEXT
: leal
-8(%eax
), %edx
18 // DISASM-NEXT
: movl
%gs
:0, %eax
20 // DISASM-NEXT
: leal
(%esi
,%eiz
), %esi
21 // DISASM-NEXT
: leal
-4(%eax
), %edx
22 // DISASM-NEXT
: movl
%gs
:0, %eax
23 // DISASM-NEXT
: leal
(%esi
), %esi
24 // DISASM-NEXT
: movl
-4(%eax
), %edx
26 // 4294967288 == 0xFFFFFFF8
27 // 4294967292 == 0xFFFFFFFC
28 // DISASM-NEXT
: movl
%gs
:0, %eax
29 // DISASM-NEXT
: movl $
4294967288, %eax
30 // DISASM-NEXT
: movl
%gs
:0, %eax
31 // DISASM-NEXT
: movl $
4294967292, %eax
32 // DISASM-NEXT
: movl
%gs
:0, %eax
33 // DISASM-NEXT
: leal
-8(%eax
), %eax
34 // DISASM-NEXT
: movl
%gs
:0, %eax
35 // DISASM-NEXT
: leal
-4(%eax
), %eax
37 .section .tbss,"awT",@nobits
52 .globl ___tls_get_addr
53 .type ___tls_get_addr,@function
60 leal tls0@tlsldm
(%ebx
),%eax
61 call ___tls_get_addr@plt
62 leal tls0@dtpoff
(%eax
),%edx
63 leal tls1@tlsldm
(%ebx
),%eax
64 call ___tls_get_addr@plt
65 leal tls1@dtpoff
(%eax
),%edx
67 leal tls1@tlsldm
(%edx
),%eax
68 call
*___tls_get_addr@GOT
(%edx
)
69 movl tls1@dtpoff
(%eax
), %edx
72 movl tls0@gotntpoff
(%ebx
),%eax
74 movl tls1@gotntpoff
(%ebx
),%eax
76 addl tls0@gotntpoff
(%ebx
),%eax
78 addl tls1@gotntpoff
(%ebx
),%eax