[llvm] Do not replace dead constant references in metadata with undef
[llvm-project.git] / lld / test / ELF / linkerscript / obj-symbol-value.s
blob17c072a7567dd9e8e4639fd48f9ca1cfcabaaf89
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3 # RUN: echo "SECTIONS { foo = bar; .bar : { *(.bar*) } }" > %t.script
4 # RUN: ld.lld %t.o --script %t.script -o %t.so -shared
5 # RUN: llvm-readobj --symbols %t.so | FileCheck %s
7 # CHECK: Symbol {
8 # CHECK: Name: bar
9 # CHECK-NEXT: Value: 0x[[VAL:.*]]
10 # CHECK: Name: foo
11 # CHECK-NEXT: Value: 0x[[VAL]]
13 .section .bar.1, "a"
14 .quad 0
16 .section .bar.2, "a"
17 .quad 0
18 .global bar
19 bar: