[llvm] Do not replace dead constant references in metadata with undef
[llvm-project.git] / lld / test / ELF / linkerscript / sections-constraint4.s
blob100529ecf62d8766e9f7019996fc19fd402a89ec
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
3 # RUN: echo "SECTIONS { \
4 # RUN: .foo : ONLY_IF_RO { *(.foo) } \
5 # RUN: .bar : {bar1 = .; *(.bar) } }" > %t1.script
6 # RUN: ld.lld -o %t1 --script %t1.script %t
7 # RUN: llvm-readobj --symbols %t1 | FileCheck %s
9 # CHECK: Name: bar1
11 .global _start
12 _start:
13 nop
15 .section .bar, "aw"
16 bar:
17 .long 1
19 .section .foo, "aw"
20 .long 0