Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / partition-move-to-main.s
blobc9fe14c135f65b6359bb247c108deec60da865a9
1 // REQUIRES: x86
2 // RUN: llvm-mc %s -o %t.o -filetype=obj --triple=x86_64-unknown-linux
3 // RUN: ld.lld %t.o -o %t --export-dynamic --gc-sections
4 // RUN: llvm-readelf -S -s %t | FileCheck %s
6 // Ordinarily, the TLS and IFUNC sections would be split into partitions.
7 // Make sure that that didn't happen by checking that there is only one
8 // of each section.
10 // CHECK: .ifunc
11 // CHECK: .tdata
13 // CHECK-NOT: .ifunc
14 // CHECK-NOT: .tdata
16 .section .llvm_sympart.f1,"",@llvm_sympart
17 .asciz "part1"
18 .quad f1
20 .section .text._start,"ax",@progbits
21 .globl _start
22 _start:
23 call tls1
24 call ifunc1
26 .section .text.f1,"ax",@progbits
27 .globl f1
28 f1:
29 call tls2
30 call ifunc2
32 .section .ifunc,"ax",@progbits,unique,1
33 .type ifunc1 STT_GNU_IFUNC
34 ifunc1:
36 .section .ifunc,"ax",@progbits,unique,2
37 .type ifunc2 STT_GNU_IFUNC
38 ifunc2:
40 .section .tdata,"awT",@progbits,unique,1
41 tls1:
43 .section .tdata,"awT",@progbits,unique,2
44 tls2: