[llvm] Do not replace dead constant references in metadata with undef
[llvm-project.git] / lld / test / ELF / copy-rel-corrupted.s
blob76f64fa7725c7d51214586a3de0d38248144f0ce
1 // REQUIRES: x86
2 // RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux
3 // RUN: llvm-mc %p/Inputs/copy-rel-corrupted.s -o %t2.o -filetype=obj -triple=x86_64-pc-linux
4 // RUN: ld.lld %t2.o -o %t2.so -shared
5 // RUN: not ld.lld %t.o %t2.so -o /dev/null 2>&1 | FileCheck %s
7 // CHECK: error: cannot create a copy relocation for symbol x
9 .global _start
10 _start:
11 .long x - .