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-readobj -s %t1 | FileCheck %s --check-prefix=CASE1
10 # CASE1: Name: .foo2 (
28 ## Check that yaml2obj reports an error in case we have
29 ## sections with equal names and suffixes.
31 # RUN: not yaml2obj --docnum=2 %s 2>&1 | FileCheck %s --check-prefix=CASE2
32 # CASE2: error: repeated section name: '.foo [1]' at YAML section number 2
33 # CASE2: error: repeated section name: '.foo [1]' at YAML section number 3
49 ## Check that yaml2obj reports an error in case we have
50 ## symbols without suffixes in the names and their
53 # RUN: not yaml2obj --docnum=3 %s 2>&1 | FileCheck %s --check-prefix=CASE3
54 # CASE3: error: repeated section name: '.foo' at YAML section number 2
68 ## Check that yaml2obj can produce an object when symbols are defined
69 ## relative to sections with duplicate names (but different name suffixes).
71 # RUN: yaml2obj --docnum=4 %s -o %t4
72 # RUN: llvm-readobj -s -t %t4 | FileCheck %s --check-prefix=CASE4
76 # CASE4-NEXT: Name: .foo
78 # CASE4-NEXT: Name: .foo
84 # CASE4-NEXT: Binding:
87 # CASE4-NEXT: Section: .foo (0x1)
91 # CASE4-NEXT: Binding:
94 # CASE4-NEXT: Section: .foo (0x2)
113 ## Check that yaml2obj can produce SHT_GROUP sections that
114 ## reference sections and symbols with name suffixes.
116 # RUN: yaml2obj --docnum=5 %s -o %t5
117 # RUN: llvm-readobj --elf-section-groups %t5 | FileCheck %s --check-prefix=CASE5
120 # CASE5-NEXT: Group {
121 # CASE5-NEXT: Name: .group (1)
122 # CASE5-NEXT: Index: 1
123 # CASE5-NEXT: Link: 5
124 # CASE5-NEXT: Info: 1
125 # CASE5-NEXT: Type: COMDAT (0x1)
126 # CASE5-NEXT: Signature: foo
127 # CASE5-NEXT: Section(s) in group [
128 # CASE5-NEXT: .text.foo (2)
131 # CASE5-NEXT: Group {
132 # CASE5-NEXT: Name: .group (1)
133 # CASE5-NEXT: Index: 3
134 # CASE5-NEXT: Link: 5
135 # CASE5-NEXT: Info: 2
136 # CASE5-NEXT: Type: COMDAT (0x1)
137 # CASE5-NEXT: Signature: foo
138 # CASE5-NEXT: Section(s) in group [
139 # CASE5-NEXT: .text.foo (4)
156 - SectionOrType: GRP_COMDAT
157 - SectionOrType: .text.foo
165 - SectionOrType: GRP_COMDAT
166 - SectionOrType: '.text.foo [1]'
167 - Name: '.text.foo [1]'
173 Section: '.text.foo [1]'