45 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o3# RUN: ld.lld %t.o -o /dev/null --keep-unique fu --icf=all --print-icf-sections | FileCheck %s4 5## Check that ICF is able to merge equivalent sections with relocations to6## different symbols, e.g. aliases, that refer to the same section which is7## ineligible for ICF.8 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)14 15.globl d, d_alias, fu, f1, f2, f3, f4, f516 17.section .data.d,"aw",@progbits18d:19d_alias:20.long 4221 22.section .text.fu,"ax",@progbits23fu:24 nop25 26.section .text.f1,"ax",@progbits27f1:28.quad d29 30.section .text.f2,"ax",@progbits31f2:32.quad d_alias33 34.section .text.f3,"ax",@progbits35f3:36.quad .data.d37 38.section .text.f4,"ax",@progbits39f4:40.quad fu41 42.section .text.f5,"ax",@progbits43f5:44.quad .text.fu45