1 # RUN: yaml2obj %s -o %t.o
3 # RUN: llvm-readelf --elf-section-groups \
4 # RUN: %t.o >%tout.log 2>%terr.log
5 # RUN: FileCheck %s -check-prefix=GNU-STDERR < %terr.log
6 # GNU-STDERR: Error: section [ 3] in group section [ 4] already in group section [ 2]
7 # RUN: FileCheck %s -check-prefix=GNU-STDOUT < %tout.log
8 # GNU-STDOUT: COMDAT group section [ 2] `.group' [bar] contains 1 sections:
9 # GNU-STDOUT-NEXT: [Index] Name
10 # GNU-STDOUT-NEXT: [ 3] .foo
11 # GNU-STDOUT: COMDAT group section [ 4] `.group1' [zed] contains 1 sections:
12 # GNU-STDOUT-NEXT: [Index] Name
14 # RUN: llvm-readobj --elf-section-groups \
15 # RUN: %t.o >%t2out.log 2>%t2err.log %t.o
16 # RUN: FileCheck %s -check-prefix=LLVM-STDERR < %t2err.log
17 # LLVM-STDERR: Error: .foo (3) in a group .group1 (4) is already in a group .group (2)
18 # RUN: FileCheck %s -check-prefix=LLVM-STDOUT < %t2out.log
19 # LLVM-STDOUT: Groups {
20 # LLVM-STDOUT-NEXT: Group {
21 # LLVM-STDOUT-NEXT: Name: .group
22 # LLVM-STDOUT-NEXT: Index: 2
23 # LLVM-STDOUT-NEXT: Link: 5
24 # LLVM-STDOUT-NEXT: Info: 1
25 # LLVM-STDOUT-NEXT: Type: COMDAT
26 # LLVM-STDOUT-NEXT: Signature: bar
27 # LLVM-STDOUT-NEXT: Section(s) in group [
28 # LLVM-STDOUT-NEXT: .foo (3)
31 # LLVM-STDOUT-NEXT: Group {
32 # LLVM-STDOUT-NEXT: Name: .group1
33 # LLVM-STDOUT-NEXT: Index: 4
34 # LLVM-STDOUT-NEXT: Link: 5
35 # LLVM-STDOUT-NEXT: Info: 2
36 # LLVM-STDOUT-NEXT: Type: COMDAT
37 # LLVM-STDOUT-NEXT: Signature: zed
38 # LLVM-STDOUT-NEXT: Section(s) in group [
52 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
53 AddressAlign: 0x0000000000000004
58 AddressAlign: 0x0000000000000004
61 - SectionOrType: GRP_COMDAT
65 Flags: [ SHF_ALLOC, SHF_EXECINSTR, SHF_GROUP ]
66 AddressAlign: 0x0000000000000001
71 AddressAlign: 0x0000000000000004
74 - SectionOrType: GRP_COMDAT