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
-soname
=t.so
%tso.o
-o
%tso
5 // RUN
: ld.lld
-shared
%t.o
%tso
-o
%t1
6 // RUN
: llvm-readobj
-S
-r
-d
%t1 | FileCheck
--check-prefix
=GOTRELSHARED
%s
7 // RUN
: llvm-objdump
--no-print-imm-hex
-d
--no-show-raw-insn
%t1 | FileCheck
--check-prefix
=DISASMSHARED
%s
9 // GOTRELSHARED
: Section
{
10 // GOTRELSHARED
: Name
: .got
11 // GOTRELSHARED-NEXT
: Type
: SHT_PROGBITS
12 // GOTRELSHARED-NEXT
: Flags
[
13 // GOTRELSHARED-NEXT
: SHF_ALLOC
14 // GOTRELSHARED-NEXT
: SHF_WRITE
15 // GOTRELSHARED-NEXT
: ]
16 // GOTRELSHARED-NEXT
: Address
: 0x3388
17 // GOTRELSHARED-NEXT
: Offset
: 0x388
18 // GOTRELSHARED-NEXT
: Size
: 16
19 // GOTRELSHARED-NEXT
: Link
: 0
20 // GOTRELSHARED-NEXT
: Info
: 0
21 // GOTRELSHARED-NEXT
: AddressAlignment
: 4
22 // GOTRELSHARED-NEXT
: EntrySize
: 0
23 // GOTRELSHARED-NEXT
: }
24 // GOTRELSHARED
: 0x6FFFFFFA RELCOUNT
8
25 // GOTRELSHARED
: Relocations
[
26 // GOTRELSHARED-NEXT
: Section
({{.*}}) .rel.dyn {
27 // GOTRELSHARED-NEXT
: 0x22DA R_386_RELATIVE
-
28 // GOTRELSHARED-NEXT
: 0x22E2 R_386_RELATIVE
-
29 // GOTRELSHARED-NEXT
: 0x22EB R_386_RELATIVE
-
30 // GOTRELSHARED-NEXT
: 0x22F4 R_386_RELATIVE
-
31 // GOTRELSHARED-NEXT
: 0x22FC R_386_RELATIVE
-
32 // GOTRELSHARED-NEXT
: 0x2305 R_386_RELATIVE
-
33 // GOTRELSHARED-NEXT
: 0x230E R_386_RELATIVE
-
34 // GOTRELSHARED-NEXT
: 0x2317 R_386_RELATIVE
-
35 // GOTRELSHARED-NEXT
: 0x3390 R_386_TLS_TPOFF tlsshared0
36 // GOTRELSHARED-NEXT
: 0x3394 R_386_TLS_TPOFF tlsshared1
37 // GOTRELSHARED-NEXT
: 0x3388 R_386_TLS_TPOFF tlslocal0
38 // GOTRELSHARED-NEXT
: 0x338C R_386_TLS_TPOFF tlslocal1
39 // GOTRELSHARED-NEXT
: }
40 // GOTRELSHARED-NEXT
: ]
42 // DISASMSHARED
: Disassembly of section test
:
43 // DISASMSHARED-EMPTY
:
44 // DISASMSHARED-NEXT
: <_start
>:
45 // (.got)[0] = 0x3388 = 13192
49 // DISASMSHARED-NEXT
: 22d8
: movl
13192, %ecx
50 // DISASMSHARED-NEXT
: 22de
: movl
%gs
:(%ecx
), %eax
51 // DISASMSHARED-NEXT
: 22e1
: movl
13192, %eax
52 // DISASMSHARED-NEXT
: 22e6
: movl
%gs
:(%eax
), %eax
53 // DISASMSHARED-NEXT
: 22e9
: addl
13192, %ecx
54 // DISASMSHARED-NEXT
: 22ef
: movl
%gs
:(%ecx
), %eax
55 // DISASMSHARED-NEXT
: 22f2: movl
13196, %ecx
56 // DISASMSHARED-NEXT
: 22f8: movl
%gs
:(%ecx
), %eax
57 // DISASMSHARED-NEXT
: 22fb
: movl
13196, %eax
58 // DISASMSHARED-NEXT
: 2300: movl
%gs
:(%eax
), %eax
59 // DISASMSHARED-NEXT
: 2303: addl
13196, %ecx
60 // DISASMSHARED-NEXT
: 2309: movl
%gs
:(%ecx
), %eax
61 // DISASMSHARED-NEXT
: 230c
: movl
13200, %ecx
62 // DISASMSHARED-NEXT
: 2312: movl
%gs
:(%ecx
), %eax
63 // DISASMSHARED-NEXT
: 2315: addl
13204, %ecx
64 // DISASMSHARED-NEXT
: 231b: movl
%gs
:(%ecx
), %eax
66 .type tlslocal0,@object
67 .section .tbss,"awT",@nobits
74 .type tlslocal1,@object
75 .section .tbss,"awT",@nobits
83 .globl ___tls_get_addr
84 .type ___tls_get_addr,@function
90 movl tlslocal0@indntpoff
,%ecx
93 movl tlslocal0@indntpoff
,%eax
96 addl tlslocal0@indntpoff
,%ecx
99 movl tlslocal1@indntpoff
,%ecx
102 movl tlslocal1@indntpoff
,%eax
105 addl tlslocal1@indntpoff
,%ecx
108 movl tlsshared0@indntpoff
,%ecx
111 addl tlsshared1@indntpoff
,%ecx