[llvm] Do not replace dead constant references in metadata with undef
[llvm-project.git] / lld / test / ELF / assignment-archive.s
blob784685e469eea9307b560747eb676877b5905391
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %ta.o
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux -o %t.o < /dev/null
4 # RUN: rm -f %tar.a
5 # RUN: llvm-ar rcs %tar.a %ta.o
7 # RUN: echo "SECTIONS { foo = 1; }" > %t1.script
8 # RUN: ld.lld -o %t1.exe --script %t1.script %tar.a %t.o
9 # RUN: llvm-readobj --symbols %t1.exe | FileCheck %s
10 # CHECK: Symbols [
11 # CHECK-NOT: bar
12 # CHECK: foo
13 # CHECK-NOT: bar
15 # RUN: echo "SECTIONS { zed = foo; }" > %t2.script
16 # RUN: ld.lld -o %t2.exe --script %t2.script %tar.a %t.o
17 # RUN: llvm-readobj --symbols %t2.exe | FileCheck %s --check-prefix=SYMS
18 # SYMS: foo
19 # SYMS: bar
21 .text
22 .globl foo
23 foo:
24 nop
26 .globl bar
27 bar:
28 nop