[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / icf9.s
blob8092677004972fca75b6408b9c243e5fdd716418
1 # REQUIRES: x86
3 ### Make sure that we do not merge data.
4 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
5 # RUN: ld.lld %t -o %t2 --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
6 # RUN: llvm-readelf -S -W %t2 | FileCheck --check-prefix=SEC %s
8 # SEC: .rodata PROGBITS 0000000000200120 000120 000002 00 A 0 0 1
10 # CHECK-NOT: selected section {{.*}}:(.rodata.d1)
11 # CHECK-NOT: selected section {{.*}}:(.rodata.d2)
13 # We do merge rodata if passed --icf-data
14 # RUN: ld.lld %t -o %t2 --icf=all --print-icf-sections --ignore-data-address-equality | \
15 # RUN: FileCheck --check-prefix=DATA %s
16 # RUN: llvm-readelf -S -W %t2 | FileCheck --check-prefix=DATA-SEC %s
18 # DATA: selected section {{.*}}:(.rodata.d1)
19 # DATA: removing identical section {{.*}}:(.rodata.d2)
21 # DATA-SEC: .rodata PROGBITS 0000000000200120 000120 000001 00 A 0 0 1
23 .globl _start, d1, d2
24 _start:
25 ret
27 .section .rodata.d1, "a"
28 d1:
29 .byte 1
31 .section .rodata.d2, "a"
32 d2:
33 .byte 1