[llvm] Do not replace dead constant references in metadata with undef
[llvm-project.git] / lld / test / ELF / merge-sym.s
blob6449ef731057abd801dd6d6e97c625e2316a18f8
1 // REQUIRES: x86
2 // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3 // RUN: ld.lld %t.o -o %t.so -shared
4 // RUN: llvm-readelf --symbols -S %t.so | FileCheck %s
6 .section .rodata.cst4,"aM",@progbits,4
7 .short 0
8 foo:
9 .short 42
11 .short 0
12 bar:
13 .short 42
15 // CHECK: Name Type Address {{.*}} ES Flg
16 // CHECK: .rodata PROGBITS [[#%x, ADDR:]] {{.*}} 04 AM{{ }}
18 // CHECK: Symbol table '.symtab' contains {{.*}} entries:
19 // CHECK-NEXT: Num: Value {{.*}} Name
20 // CHECK-DAG: {{.*}}: {{0*}}[[#ADDR+2]] {{.*}} foo
21 // CHECK-DAG: {{.*}}: {{0*}}[[#ADDR+2]] {{.*}} bar