2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
3 # RUN: ld.lld %t.o -o /dev/null --keep-unique fu --icf=all --print-icf-sections | FileCheck %s
5 ## Check that ICF is able to merge equivalent sections with relocations to
6 ## different symbols, e.g. aliases, that refer to the same section which is
9 # CHECK: selected section {{.*}}:(.text.f1)
10 # CHECK: removing identical section {{.*}}:(.text.f2)
11 # CHECK: removing identical section {{.*}}:(.text.f3)
12 # CHECK: selected section {{.*}}:(.text.f4)
13 # CHECK: removing identical section {{.*}}:(.text.f5)
15 .globl d, d_alias, fu, f1, f2, f3, f4, f5
17 .section .data.d,"aw",@progbits
22 .section .text.fu,"ax",@progbits
26 .section .text.f1,"ax",@progbits
30 .section .text.f2,"ax",@progbits
34 .section .text.f3,"ax",@progbits
38 .section .text.f4,"ax",@progbits
42 .section .text.f5,"ax",@progbits