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
## Check we are able to produce an SHT_GROUP section with a custom Info value (12345).

# RUN: yaml2obj %s -o %t1
# RUN: llvm-readobj --sections %t1 | FileCheck %s

--- !ELF
FileHeader:
  Class:               ELFCLASS64
  Data:                ELFDATA2LSB
  Type:                ET_REL
  Machine:             EM_X86_64
Sections:
  - Name:              .group
    Type:              SHT_GROUP
    Info:              12345
    Members:
      - SectionOrType: GRP_COMDAT

# CHECK:      Name: .group
# CHECK-NEXT: Type: SHT_GROUP
# CHECK-NEXT: Flags [
# CHECK-NEXT: ]
# CHECK-NEXT: Address:
# CHECK-NEXT: Offset:
# CHECK-NEXT: Size:
# CHECK-NEXT: Link:
# CHECK-NEXT: Info: 12345

## Check we report multiple errors when multiple unknown symbols are referenced by SHT_GROUP sections.

# RUN: not yaml2obj --docnum=2 %s 2>&1 | FileCheck %s --check-prefix=ERR

# ERR: error: unknown symbol referenced: 'foo' by YAML section '.group1'
# ERR: error: unknown symbol referenced: 'bar' by YAML section '.group2'

--- !ELF
FileHeader:
  Class:   ELFCLASS64
  Data:    ELFDATA2LSB
  Type:    ET_REL
  Machine: EM_X86_64
Sections:
  - Name: .group1
    Type: SHT_GROUP
    Link: .symtab
    Info: foo
    Members:
      - SectionOrType: GRP_COMDAT
  - Name: .group2
    Type: SHT_GROUP
    Link: .symtab
    Info: bar
    Members:
      - SectionOrType: GRP_COMDAT