[llvm] Do not replace dead constant references in metadata with undef
[llvm-project.git] / lld / test / ELF / tail-merge-string-align.s
blob8c63ab2de853f0a782e659d2e0c28eb395cd2a0e
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 -O3
4 // RUN: llvm-readobj -S --section-data %t.so | FileCheck %s
6 .section .rodata.4a,"aMS",@progbits,1
7 .align 4
8 .asciz "abcdef"
10 .section .rodata.4b,"aMS",@progbits,1
11 .align 4
12 .asciz "ef"
14 .section .rodata.4c,"aMS",@progbits,1
15 .align 4
16 .asciz "f"
19 // CHECK: Name: .rodata
20 // CHECK-NEXT: Type: SHT_PROGBITS
21 // CHECK-NEXT: Flags [
22 // CHECK-NEXT: SHF_ALLOC
23 // CHECK-NEXT: SHF_MERGE
24 // CHECK-NEXT: SHF_STRINGS
25 // CHECK-NEXT: ]
26 // CHECK-NEXT: Address:
27 // CHECK-NEXT: Offset:
28 // CHECK-NEXT: Size: 1
29 // CHECK-NEXT: Link: 0
30 // CHECK-NEXT: Info: 0
31 // CHECK-NEXT: AddressAlignment: 4
32 // CHECK-NEXT: EntrySize:
33 // CHECK-NEXT: SectionData (
34 // CHECK-NEXT: 0000: 61626364 65660000 6600 |abcdef..f.|
35 // CHECK-NEXT: )