1 ## Check that yaml2obj is able to produce an object from YAML
2 ## containing sections with duplicate names (but different name suffixes).
4 # RUN: yaml2obj --docnum=1 %s -o %t1
5 # RUN: llvm-readelf -S %t1 | FileCheck %s --check-prefix=CASE1
7 # CASE1: [Nr] Name Type
8 # CASE1: [ 1] .foo1 PROGBITS
9 # CASE1-NEXT: [ 2] .foo PROGBITS
10 # CASE1-NEXT: [ 3] .foo PROGBITS
11 # CASE1-NEXT: [ 4] .foo2 PROGBITS
12 # CASE1-NEXT: [ 5] .foo2 ( PROGBITS
13 # CASE1-NEXT: [ 6] .foo2 ) PROGBITS
14 # CASE1-NEXT: [ 7] .foo2 PROGBITS
37 ## Check that yaml2obj reports an error in case we have
38 ## sections with equal names and suffixes.
40 # RUN: not yaml2obj --docnum=2 %s 2>&1 | FileCheck %s --check-prefix=CASE2
41 # CASE2: error: repeated section/fill name: '.foo (1)' at YAML section/fill number 2
42 # CASE2: error: repeated section/fill name: '.foo (1)' at YAML section/fill number 3
57 ## Check that yaml2obj reports an error in case we have
58 ## symbols without suffixes in the names and their
61 # RUN: not yaml2obj --docnum=3 %s 2>&1 | FileCheck %s --check-prefix=CASE3
62 # CASE3: error: repeated section/fill name: '.foo' at YAML section/fill number 2
75 ## Check that yaml2obj can produce an object when symbols are defined
76 ## relative to sections with duplicate names (but different name suffixes).
78 # RUN: yaml2obj --docnum=4 %s -o %t4
79 # RUN: llvm-readobj -s -t %t4 | FileCheck %s --check-prefix=CASE4
83 # CASE4-NEXT: Name: .foo
85 # CASE4-NEXT: Name: .foo
91 # CASE4-NEXT: Binding:
94 # CASE4-NEXT: Section: .foo (0x1)
98 # CASE4-NEXT: Binding:
101 # CASE4-NEXT: Section: .foo (0x2)
119 ## Check that yaml2obj can produce SHT_GROUP sections that
120 ## reference sections and symbols with name suffixes.
122 # RUN: yaml2obj --docnum=5 %s -o %t5
123 # RUN: llvm-readobj --section-groups %t5 | FileCheck %s --check-prefix=CASE5
126 # CASE5-NEXT: Group {
127 # CASE5-NEXT: Name: .group (1)
128 # CASE5-NEXT: Index: 1
129 # CASE5-NEXT: Link: 5
130 # CASE5-NEXT: Info: 1
131 # CASE5-NEXT: Type: COMDAT (0x1)
132 # CASE5-NEXT: Signature: foo
133 # CASE5-NEXT: Section(s) in group [
134 # CASE5-NEXT: .text.foo (2)
137 # CASE5-NEXT: Group {
138 # CASE5-NEXT: Name: .group (1)
139 # CASE5-NEXT: Index: 3
140 # CASE5-NEXT: Link: 5
141 # CASE5-NEXT: Info: 2
142 # CASE5-NEXT: Type: COMDAT (0x1)
143 # CASE5-NEXT: Signature: foo
144 # CASE5-NEXT: Section(s) in group [
145 # CASE5-NEXT: .text.foo (4)
160 - SectionOrType: GRP_COMDAT
161 - SectionOrType: .text.foo
168 - SectionOrType: GRP_COMDAT
169 - SectionOrType: '.text.foo (1)'
170 - Name: '.text.foo (1)'
176 Section: '.text.foo (1)'