[clang-tidy][modernize-use-starts-ends-with] Fix operator rewriting false negative...
[llvm-project.git] / lld / test / ELF / merge-string-align.s
blob661019dd9b5b7e54dc330cb4b5faa69a9ff2676b
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 -M | FileCheck %s --check-prefix=MAP
4 // RUN: llvm-readobj -S --section-data %t.so | FileCheck %s
6 // MAP: .rodata{{$}}
7 // MAP-NEXT: <internal>:(.rodata.foo)
8 // MAP-NEXT: .rodata2
9 // MAP-NEXT: <internal>:(.rodata2)
11 .section .rodata.foo,"aMS",@progbits,1
12 .align 16
13 .asciz "foo"
15 .section .rodata.foo2,"aMS",@progbits,1
16 .align 16
17 .asciz "foo"
19 .section .rodata.bar,"aMS",@progbits,1
20 .align 16
21 .asciz "bar"
23 // CHECK: Name: .rodata
24 // CHECK-NEXT: Type: SHT_PROGBITS
25 // CHECK-NEXT: Flags [
26 // CHECK-NEXT: SHF_ALLOC
27 // CHECK-NEXT: SHF_MERGE
28 // CHECK-NEXT: SHF_STRINGS
29 // CHECK-NEXT: ]
30 // CHECK-NEXT: Address:
31 // CHECK-NEXT: Offset:
32 // CHECK-NEXT: Size: 20
33 // CHECK-NEXT: Link: 0
34 // CHECK-NEXT: Info: 0
35 // CHECK-NEXT: AddressAlignment: 16
36 // CHECK-NEXT: EntrySize:
37 // CHECK-NEXT: SectionData (
38 // CHECK-NEXT: 0000: 666F6F00 00000000 00000000 00000000 |foo.............|
39 // CHECK-NEXT: 0010: 62617200 |bar.|
40 // CHECK-NEXT: )
42 .section .rodata2,"aMS",@progbits,1
43 .asciz "foo"
45 // CHECK: Name: .rodata2
46 // CHECK-NEXT: Type: SHT_PROGBITS
47 // CHECK-NEXT: Flags [
48 // CHECK-NEXT: SHF_ALLOC
49 // CHECK-NEXT: SHF_MERGE
50 // CHECK-NEXT: SHF_STRINGS
51 // CHECK-NEXT: ]
52 // CHECK-NEXT: Address:
53 // CHECK-NEXT: Offset:
54 // CHECK-NEXT: Size: 4
55 // CHECK-NEXT: Link: 0
56 // CHECK-NEXT: Info: 0
57 // CHECK-NEXT: AddressAlignment: 1
58 // CHECK-NEXT: EntrySize:
59 // CHECK-NEXT: SectionData (
60 // CHECK-NEXT: 0000: 666F6F00 |foo.|
61 // CHECK-NEXT: )