reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
# RUN: yaml2obj %s -o %t.o

# RUN: llvm-readelf --elf-section-groups \
# RUN:   %t.o >%tout.log 2>%terr.log
# RUN: FileCheck %s -check-prefix=GNU-STDERR < %terr.log
# GNU-STDERR: Error: section [    3] in group section [    4] already in group section [    2]
# RUN: FileCheck %s -check-prefix=GNU-STDOUT < %tout.log
# GNU-STDOUT:      COMDAT group section [    2] `.group' [bar] contains 1 sections:
# GNU-STDOUT-NEXT:   [Index]    Name
# GNU-STDOUT-NEXT:   [    3]   .foo
# GNU-STDOUT:      COMDAT group section [    4] `.group1' [zed] contains 1 sections:
# GNU-STDOUT-NEXT:   [Index]    Name

# RUN: llvm-readobj --elf-section-groups \
# RUN:   %t.o >%t2out.log 2>%t2err.log %t.o
# RUN: FileCheck %s -check-prefix=LLVM-STDERR < %t2err.log
# LLVM-STDERR: Error: .foo (3) in a group .group1 (4) is already in a group .group (2)
# RUN: FileCheck %s -check-prefix=LLVM-STDOUT < %t2out.log
# LLVM-STDOUT:      Groups {
# LLVM-STDOUT-NEXT:   Group {
# LLVM-STDOUT-NEXT:     Name: .group
# LLVM-STDOUT-NEXT:     Index: 2
# LLVM-STDOUT-NEXT:     Link: 5
# LLVM-STDOUT-NEXT:     Info: 1
# LLVM-STDOUT-NEXT:     Type: COMDAT
# LLVM-STDOUT-NEXT:     Signature: bar
# LLVM-STDOUT-NEXT:     Section(s) in group [
# LLVM-STDOUT-NEXT:       .foo (3)
# LLVM-STDOUT-NEXT:     ]
# LLVM-STDOUT-NEXT:   }
# LLVM-STDOUT-NEXT:   Group {
# LLVM-STDOUT-NEXT:     Name: .group1
# LLVM-STDOUT-NEXT:     Index: 4
# LLVM-STDOUT-NEXT:     Link: 5
# LLVM-STDOUT-NEXT:     Info: 2
# LLVM-STDOUT-NEXT:     Type: COMDAT
# LLVM-STDOUT-NEXT:     Signature: zed
# LLVM-STDOUT-NEXT:     Section(s) in group [
# LLVM-STDOUT-NEXT:     ]
# LLVM-STDOUT-NEXT:   }
# LLVM-STDOUT-NEXT: }

!ELF
FileHeader:      
  Class:           ELFCLASS64
  Data:            ELFDATA2LSB
  Type:            ET_REL
  Machine:         EM_X86_64
Sections:        
  - Name:            .text
    Type:            SHT_PROGBITS
    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
    AddressAlign:    0x0000000000000004
    Content:         ''
  - Name:            .group
    Type:            SHT_GROUP
    Link:            .symtab
    AddressAlign:    0x0000000000000004
    Info:            bar
    Members:         
      - SectionOrType:   GRP_COMDAT
      - SectionOrType:   .foo
  - Name:            .foo
    Type:            SHT_PROGBITS
    Flags:           [ SHF_ALLOC, SHF_EXECINSTR, SHF_GROUP ]
    AddressAlign:    0x0000000000000001
    Content:         ''
  - Name:            .group1
    Type:            SHT_GROUP
    Link:            .symtab
    AddressAlign:    0x0000000000000004
    Info:            zed
    Members:         
      - SectionOrType:   GRP_COMDAT
      - SectionOrType:   .foo
Symbols:
  - Name:            bar
    Section:         .group
  - Name:            zed
    Section:         .group1