2 // RUN
: llvm-mc
-filetype
=obj
-triple
=i686
%p
/Inputs
/tls-opt-gdiele-i686.s
-o
%t.o
3 // RUN
: llvm-mc
-filetype
=obj
-triple
=i686
%s
-o
%t1.o
4 // RUN
: ld.lld
-shared
%t.o
-soname
=t.so
-o
%t.so
5 // RUN
: ld.lld
--hash-style
=sysv
%t1.o
%t.so
-o
%tout
6 // RUN
: llvm-readobj
-r
%tout | FileCheck
--check-prefix
=NORELOC
%s
7 // RUN
: llvm-objdump
--no-print-imm-hex
-d
--no-show-raw-insn
%tout | FileCheck
--check-prefix
=DISASM
%s
9 // NORELOC
: Relocations
[
10 // NORELOC-NEXT
: Section
({{.*}}) .rel.dyn {
11 // NORELOC-NEXT
: 0x402270 R_386_TLS_TPOFF tlsshared0
12 // NORELOC-NEXT
: 0x402274 R_386_TLS_TPOFF tlsshared1
16 // DISASM
: Disassembly of section
.text:
18 // DISASM-NEXT
: <_start
>:
19 // DISASM-NEXT
: 4011d0
: movl
%gs
:0, %eax
20 // DISASM-NEXT
: addl
-4104(%ebx
), %eax
21 // DISASM-NEXT
: movl
%gs
:0, %eax
22 // DISASM-NEXT
: addl
-4100(%ebx
), %eax
23 // DISASM-NEXT
: movl
%gs
:0, %eax
24 // DISASM-NEXT
: subl $
8, %eax
25 // DISASM-NEXT
: movl
%gs
:0, %eax
26 // DISASM-NEXT
: subl $
4, %eax
27 // DISASM-NEXT
: movl
%gs
:0, %eax
28 // DISASM-NEXT
: addl
-4100(%ebx
), %eax
29 // DISASM-NEXT
: movl
%gs
:0, %eax
30 // DISASM-NEXT
: subl $
4, %eax
33 .section .tbss,"awT",@nobits
41 .section .tbss,"awT",@nobits
49 .globl ___tls_get_addr
50 .type ___tls_get_addr,@function
57 leal tlsshared0@tlsgd
(,%ebx
,1),%eax
58 call ___tls_get_addr@plt
59 leal tlsshared1@tlsgd
(,%ebx
,1),%eax
60 call ___tls_get_addr@plt
62 leal tlsexe1@tlsgd
(,%ebx
,1),%eax
63 call ___tls_get_addr@plt
64 leal tlsexe2@tlsgd
(,%ebx
,1),%eax
65 call ___tls_get_addr@plt
67 // -fno-plt GD-
>IE
and GD-
>LE
68 leal tlsshared1@tlsgd
(%edx
),%eax
69 call
*___tls_get_addr@GOT
(%edx
)
70 leal tlsexe2@tlsgd
(%edx
),%eax
71 call
*___tls_get_addr@GOT
(%edx
)