1// REQUIRES: x86
2
3// This file contains two functions. They are themselves identical,
4// but because they have relocations against different data sections,
5// they are not mergeable.
6
7// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1
8// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux \
9// RUN:    %p/Inputs/icf-non-mergeable.s -o %t2
10
11// RUN: ld.lld %t1 %t2 -o /dev/null --icf=all --verbose 2>&1 | FileCheck %s
12
13// CHECK-NOT: selected section '.text.f1'
14// CHECK-NOT:   removing identical section '.text.f2'
15
16.globl _start, f1, f2, d1, d2
17_start:
18  ret
19
20.section .text.f1, "ax"
21f1:
22  movl $5, d1
23  ret
24
25.section .text.f2, "ax"
26f2:
27  movl $5, d2
28  ret
29