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
   81
   82
## Check that llvm-readelf and llvm-readobj can
## dump SHT_GROUP sections properly.

# RUN: yaml2obj %s -o %t.o
# RUN: llvm-readobj -g %t.o | FileCheck %s
# RUN: llvm-readelf -g %t.o | FileCheck --check-prefix=GNU %s

# CHECK:      Groups {
# CHECK-NEXT:   Group {
# CHECK-NEXT:     Name: .group
# CHECK-NEXT:     Index: 1
# CHECK-NEXT:     Link: 7
# CHECK-NEXT:     Info: 1
# CHECK-NEXT:     Type: COMDAT
# CHECK-NEXT:     Signature: foo
# CHECK-NEXT:     Section(s) in group [
# CHECK-NEXT:       .text.foo
# CHECK-NEXT:       .rela.text.foo
# CHECK-NEXT:     ]
# CHECK-NEXT:   }
# CHECK-NEXT:   Group {
# CHECK-NEXT:     Name: .group1
# CHECK-NEXT:     Index: 2
# CHECK-NEXT:     Link: 7
# CHECK-NEXT:     Info: 2
# CHECK-NEXT:     Type: COMDAT
# CHECK-NEXT:     Signature: bar
# CHECK-NEXT:     Section(s) in group [
# CHECK-NEXT:       .text.bar
# CHECK-NEXT:       .rela.text.bar
# CHECK-NEXT:     ]
# CHECK-NEXT:   }

# GNU:      COMDAT group section [    1] `.group' [foo] contains 2 sections:
# GNU-NEXT:  [Index]  Name
# GNU-NEXT:  [    3] .text.foo
# GNU-NEXT:  [    4] .rela.text.foo
# GNU:      COMDAT group section [    2] `.group1' [bar] contains 2 sections:
# GNU-NEXT:  [Index]  Name
# GNU-NEXT:  [    5] .text.bar
# GNU-NEXT:  [    6] .rela.text.bar

--- !ELF
FileHeader:
  Class:   ELFCLASS64
  Data:    ELFDATA2LSB
  Type:    ET_REL
  Machine: EM_X86_64
Sections:
  - Name: .group
    Type: SHT_GROUP
    Link: .symtab
    Info: foo
    Members:
      - SectionOrType: GRP_COMDAT
      - SectionOrType: .text.foo
      - SectionOrType: .rela.text.foo
  - Name: .group1
    Type: SHT_GROUP
    Link: .symtab
    Info: bar
    Members:
      - SectionOrType: GRP_COMDAT
      - SectionOrType: .text.bar
      - SectionOrType: .rela.text.bar
  - Name:  .text.foo
    Type:  SHT_PROGBITS
  - Name: .rela.text.foo
    Type: SHT_RELA
    Link: .symtab
    Info: .text.foo
  - Name: .text.bar
    Type: SHT_PROGBITS
  - Name: .rela.text.bar
    Type: SHT_RELA
    Link: .symtab
    Info: .text.bar
Symbols:
  - Name:    foo
    Section: .text.foo
  - Name:    bar
    Section: .text.bar