2 // RUN
: llvm-mc
-filetype
=obj
-triple
=i686-pc-linux
%s
-o
%t.o
3 // RUN
: llvm-mc
-filetype
=obj
-triple
=i686-pc-linux
%p
/Inputs
/tls-opt-iele-i686-nopic.s
-o
%tso.o
4 // RUN
: ld.lld
-shared
%tso.o
-soname
=t.so
-o
%tso
5 // RUN
: ld.lld
--hash-style
=sysv
%t.o
%tso
-o
%t1
6 // RUN
: llvm-readobj
-S
-r
%t1 | FileCheck
--check-prefix
=GOTREL
%s
7 // RUN
: llvm-objdump
-d
--no-show-raw-insn
--print-imm-hex
%t1 | FileCheck
--check-prefix
=DISASM
%s
12 // GOTREL-NEXT
: Type
: SHT_PROGBITS
13 // GOTREL-NEXT
: Flags
[
14 // GOTREL-NEXT
: SHF_ALLOC
15 // GOTREL-NEXT
: SHF_WRITE
17 // GOTREL-NEXT
: Address
: 0x402250
18 // GOTREL-NEXT
: Offset
: 0x250
19 // GOTREL-NEXT
: Size
: 8
20 // GOTREL-NEXT
: Link
: 0
21 // GOTREL-NEXT
: Info
: 0
22 // GOTREL-NEXT
: AddressAlignment
: 4
23 // GOTREL-NEXT
: EntrySize
: 0
25 // GOTREL
: Relocations
[
26 // GOTREL-NEXT
: Section
({{.*}}) .rel.dyn {
27 // GOTREL-NEXT
: 0x402250 R_386_TLS_TPOFF tlsshared0
28 // GOTREL-NEXT
: 0x402254 R_386_TLS_TPOFF tlsshared1
32 // DISASM
: Disassembly of section
.text:
34 // DISASM-NEXT
: <_start
>:
35 // DISASM-NEXT
: 4011b0
: movl $
0xfffffff8, %ecx
36 // DISASM-NEXT
: movl
%gs
:(%ecx
), %eax
37 // DISASM-NEXT
: movl $
0xfffffff8, %eax
38 // DISASM-NEXT
: movl
%gs
:(%eax
), %eax
39 // DISASM-NEXT
: addl $
0xfffffff8, %ecx
40 // DISASM-NEXT
: movl
%gs
:(%ecx
), %eax
41 // DISASM-NEXT
: movl $
0xfffffffc, %ecx
42 // DISASM-NEXT
: movl
%gs
:(%ecx
), %eax
43 // DISASM-NEXT
: movl $
0xfffffffc, %eax
44 // DISASM-NEXT
: movl
%gs
:(%eax
), %eax
45 // DISASM-NEXT
: addl $
0xfffffffc, %ecx
46 // DISASM-NEXT
: movl
%gs
:(%ecx
), %eax
48 // DISASM-NEXT
: movl
0x402250, %ecx
49 // DISASM-NEXT
: movl
%gs
:(%ecx
), %eax
51 // DISASM-NEXT
: addl
0x402254, %ecx
52 // DISASM-NEXT
: movl
%gs
:(%ecx
), %eax
54 .type tlslocal0,@object
55 .section .tbss,"awT",@nobits
62 .type tlslocal1,@object
63 .section .tbss,"awT",@nobits
71 .globl ___tls_get_addr
72 .type ___tls_get_addr,@function
78 movl tlslocal0@indntpoff
,%ecx
81 movl tlslocal0@indntpoff
,%eax
84 addl tlslocal0@indntpoff
,%ecx
87 movl tlslocal1@indntpoff
,%ecx
90 movl tlslocal1@indntpoff
,%eax
93 addl tlslocal1@indntpoff
,%ecx
96 movl tlsshared0@indntpoff
,%ecx
99 addl tlsshared1@indntpoff
,%ecx