[clang-tidy][use-internal-linkage]fix false positives for global overloaded operator...
[llvm-project.git] / lld / test / COFF / output-chars.test
blob2b20b0351a232b8f5d46b9dee0a255aeb84002e8
1 # RUN: yaml2obj %s -o %t.obj
2 # RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t.obj
3 # RUN: llvm-readobj --sections %t.dll | FileCheck %s
4 # RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t.obj /section:.foo,rwe
5 # RUN: llvm-readobj --sections %t.dll | FileCheck --check-prefix=SECTION %s
6 # RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t.obj /merge:.foo=.bar
7 # RUN: llvm-readobj --sections --section-data %t.dll | FileCheck --check-prefix=MERGE %s
8 # RUN: lld-link /out:%t.dll /entry:__ImageBase /dll %t.obj /merge:.foo=.bar /section:.foo,rwe
9 # RUN: llvm-readobj --sections %t.dll | FileCheck --check-prefix=MERGE-SECTION %s
11 # CHECK: Name: .foo
12 # CHECK: Characteristics [
13 # CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
14 # CHECK-NEXT: IMAGE_SCN_MEM_READ
15 # CHECK-NEXT: ]
17 # CHECK: Name: .foo
18 # CHECK: Characteristics [
19 # CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
20 # CHECK-NEXT: IMAGE_SCN_MEM_READ
21 # CHECK-NEXT: IMAGE_SCN_MEM_WRITE
22 # CHECK-NEXT: ]
24 # SECTION: Name: .foo
25 # SECTION: Characteristics [
26 # SECTION-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
27 # SECTION-NEXT: IMAGE_SCN_MEM_EXECUTE
28 # SECTION-NEXT: IMAGE_SCN_MEM_READ
29 # SECTION-NEXT: IMAGE_SCN_MEM_WRITE
30 # SECTION-NEXT: ]
32 # SECTION: Name: .foo
33 # SECTION: Characteristics [
34 # SECTION-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
35 # SECTION-NEXT: IMAGE_SCN_MEM_EXECUTE
36 # SECTION-NEXT: IMAGE_SCN_MEM_READ
37 # SECTION-NEXT: IMAGE_SCN_MEM_WRITE
38 # SECTION-NEXT: ]
40 # MERGE: Name: .bar
41 # MERGE: Characteristics [
42 # MERGE-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
43 # MERGE-NEXT: IMAGE_SCN_MEM_READ
44 # MERGE-NEXT: ]
45 # MERGE-NEXT: SectionData (
46 # MERGE-NEXT: 0000: 0301
48 # MERGE: Name: .bar
49 # MERGE: Characteristics [
50 # MERGE-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
51 # MERGE-NEXT: IMAGE_SCN_MEM_READ
52 # MERGE-NEXT: IMAGE_SCN_MEM_WRITE
53 # MERGE-NEXT: ]
54 # MERGE-NEXT: SectionData (
55 # MERGE-NEXT: 0000: 04
57 # MERGE: Name: .foo
58 # MERGE: Characteristics [
59 # MERGE-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
60 # MERGE-NEXT: IMAGE_SCN_MEM_READ
61 # MERGE-NEXT: IMAGE_SCN_MEM_WRITE
62 # MERGE-NEXT: ]
63 # MERGE-NEXT: SectionData (
64 # MERGE-NEXT: 0000: 02
66 # MERGE-SECTION: Name: .bar
67 # MERGE-SECTION: Characteristics [
68 # MERGE-SECTION-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
69 # MERGE-SECTION-NEXT: IMAGE_SCN_MEM_READ
70 # MERGE-SECTION-NEXT: ]
72 # MERGE-SECTION: Name: .bar
73 # MERGE-SECTION: Characteristics [
74 # MERGE-SECTION-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
75 # MERGE-SECTION-NEXT: IMAGE_SCN_MEM_READ
76 # MERGE-SECTION-NEXT: IMAGE_SCN_MEM_WRITE
77 # MERGE-SECTION-NEXT: ]
79 # MERGE-SECTION: Name: .foo
80 # MERGE-SECTION: Characteristics [
81 # MERGE-SECTION-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
82 # MERGE-SECTION-NEXT: IMAGE_SCN_MEM_EXECUTE
83 # MERGE-SECTION-NEXT: IMAGE_SCN_MEM_READ
84 # MERGE-SECTION-NEXT: IMAGE_SCN_MEM_WRITE
85 # MERGE-SECTION-NEXT: ]
87 --- !COFF
88 header:
89   Machine:         IMAGE_FILE_MACHINE_AMD64
90   Characteristics: [  ]
91 sections:
92   - Name:            .foo
93     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
94     Alignment:       1
95     SectionData:     01
96   - Name:            .foo
97     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
98     Alignment:       1
99     SectionData:     02
100   - Name:            .bar
101     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
102     Alignment:       1
103     SectionData:     03
104   - Name:            .bar
105     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
106     Alignment:       1
107     SectionData:     04
108 symbols: