[clang-tidy][modernize-use-starts-ends-with] Fix operator rewriting false negative...
[llvm-project.git] / lld / test / ELF / i386-tls-gdiele.s
blobe698088c9f0b4800772ee5ee8e6788737ded557e
1 // REQUIRES: x86
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
13 // NORELOC-NEXT: }
14 // NORELOC-NEXT: ]
16 // DISASM: Disassembly of section .text:
17 // DISASM-EMPTY:
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
32 .type tlsexe1,@object
33 .section .tbss,"awT",@nobits
34 .globl tlsexe1
35 .align 4
36 tlsexe1:
37 .long 0
38 .size tlsexe1, 4
40 .type tlsexe2,@object
41 .section .tbss,"awT",@nobits
42 .globl tlsexe2
43 .align 4
44 tlsexe2:
45 .long 0
46 .size tlsexe2, 4
48 .section .text
49 .globl ___tls_get_addr
50 .type ___tls_get_addr,@function
51 ___tls_get_addr:
53 .section .text
54 .globl _start
55 _start:
56 //GD->IE
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
61 //GD->LE
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)