[llvm] Do not replace dead constant references in metadata with undef
[llvm-project.git] / lld / test / ELF / icf10.s
blobb782f9248448d154d23285ec05818ba972425e22
1 # REQUIRES: x86
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-freebsd %s -o %t.o
4 # RUN: ld.lld --icf=all %t.o -o /dev/null --print-icf-sections 2>&1 | FileCheck %s
6 # Checks that ICF does not merge 2 sections the offset of
7 # the relocations of which differ.
9 # CHECK-NOT: selected
11 .section .text.foo,"ax"
12 .quad -1
13 .reloc 0, R_X86_64_NONE, 0
15 .section .text.bar,"ax"
16 .quad -1
17 .reloc 1, R_X86_64_NONE, 0