[llvm] Do not replace dead constant references in metadata with undef
[llvm-project.git] / lld / test / ELF / linkerscript / sections-constraint2.s
blob6d4a33936877125534bd316fe79756c3cab6eee5
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3 # RUN: echo "SECTIONS { zed : ONLY_IF_RO { *(foo) *(bar) } }" > %t.script
4 # RUN: ld.lld -T %t.script %t.o -o %t.so -shared
5 # RUN: llvm-readobj -S %t.so | FileCheck %s
7 # CHECK: Sections [
8 # CHECK-NOT: zed
10 .section foo,"aw"
11 .quad 1
13 .section bar, "a"
14 .quad 2