[llvm] Do not replace dead constant references in metadata with undef
[llvm-project.git] / lld / test / ELF / linkerscript / repsection-symbol.s
blobd5f61ee82cece043b1e59b7f14a6d76a64cb20ed
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
4 # RUN: echo "SECTIONS { \
5 # RUN: . = SIZEOF_HEADERS; \
6 # RUN: .text : { *(.text) } \
7 # RUN: .foo : {foo1 = .; *(.foo.*) foo2 = .; *(.bar) foo3 = .;} \
8 # RUN: }" > %t.script
9 # RUN: ld.lld -o %t1 --script %t.script %t -shared
10 # RUN: llvm-readobj --symbols %t1 | FileCheck %s
12 # CHECK: Name: foo1
13 # CHECK-NEXT: Value: 0x330
15 # CHECK: Name: foo2
16 # CHECK-NEXT: Value: 0x338
18 # CHECK: Name: foo3
19 # CHECK-NEXT: Value: 0x33C
21 .section .foo.1,"a"
22 .long 1
24 .section .foo.2,"aw"
25 .long 2
27 .section .bar,"aw"
28 .long 3