Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / x86-64-tls-ie-local.s
blobc527c86e6677134d8beb20202e2af15ec13d7073
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
3 # RUN: ld.lld -shared %t.o -o %t.so
4 # RUN: llvm-readelf -S %t.so | FileCheck --check-prefix=SEC %s
5 # RUN: llvm-readobj -r %t.so | FileCheck --check-prefix=REL %s
6 # RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %t.so | FileCheck %s
8 # SEC: .got PROGBITS 0000000000002338 000338 000010 00 WA 0 0 8
10 ## Dynamic relocations for non-preemptable symbols in a shared object have section index 0.
11 # REL: .rela.dyn {
12 # REL-NEXT: 0x2338 R_X86_64_TPOFF64 - 0x0
13 # REL-NEXT: 0x2340 R_X86_64_TPOFF64 - 0x4
14 # REL-NEXT: }
16 ## &.got[0] - 0x127f = 0x2338 - 0x127f = 4281
17 ## &.got[1] - 0x1286 = 0x2340 - 0x1286 = 4282
18 # CHECK: 1278: addq 4281(%rip), %rax
19 # CHECK-NEXT: 127f: addq 4282(%rip), %rax
21 addq foo@GOTTPOFF(%rip), %rax
22 addq bar@GOTTPOFF(%rip), %rax
24 .section .tbss,"awT",@nobits
25 foo:
26 .long 0
27 bar:
28 .long 0