sections.yaml 3.9 KB
# RUN: yaml2obj %s > %t.obj
# RUN: obj2yaml %t.obj | FileCheck --check-prefix=CHECK %s
# RUN: llvm-objdump -section-headers %t.obj | FileCheck --check-prefix=HEADERS %s

--- !COFF
header:
  Machine:         IMAGE_FILE_MACHINE_AMD64
  Characteristics: [  ]
sections:
  - Name:            '.debug$T'
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
    Alignment:       1
    Types:
      - Kind:            LF_TYPESERVER2
        TypeServer2:
          Guid:            '{01DF191B-22BF-6B42-96CE-5258B8329FE5}'
          Age:             24
          Name:            'C:\src\llvm-project\build\vc140.pdb'
  - Name:            '.debug$H'
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
    Alignment:       4
    GlobalHashes:
      Version:          0
      HashAlgorithm:    1
      HashValues:
        - AC2B89A424EC4805
        - 70FA296AAA577E53
        - E2C98293782A7EB4
        - 159516AF20B79286
        - F471B6BDECC99BC9
symbols:
  - Name:            '.debug$T'
    Value:           0
    SectionNumber:   1
    SimpleType:      IMAGE_SYM_TYPE_NULL
    ComplexType:     IMAGE_SYM_DTYPE_NULL
    StorageClass:    IMAGE_SYM_CLASS_STATIC
    SectionDefinition:
      Length:          64
      NumberOfRelocations: 0
      NumberOfLinenumbers: 0
      CheckSum:        0
      Number:          0
  - Name:            '.debug$H'
    Value:           0
    SectionNumber:   2
    SimpleType:      IMAGE_SYM_TYPE_NULL
    ComplexType:     IMAGE_SYM_DTYPE_NULL
    StorageClass:    IMAGE_SYM_CLASS_STATIC
    SectionDefinition:
      Length:          108
      NumberOfRelocations: 0
      NumberOfLinenumbers: 0
      CheckSum:        2189213922
      Number:          1
...

# CHECK: --- !COFF
# CHECK: header:
# CHECK:   Machine:         IMAGE_FILE_MACHINE_AMD64
# CHECK:   Characteristics: [  ]
# CHECK: sections:
# CHECK:   - Name:            '.debug$T'
# CHECK:     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
# CHECK:     Alignment:       1
# CHECK:     Types:
# CHECK:       - Kind:            LF_TYPESERVER2
# CHECK:         TypeServer2:
# CHECK:           Guid:            '{01DF191B-22BF-6B42-96CE-5258B8329FE5}'
# CHECK:           Age:             24
# CHECK:           Name:            'C:\src\llvm-project\build\vc140.pdb'
# CHECK:   - Name:            '.debug$H'
# CHECK:     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
# CHECK:     Alignment:       4
# CHECK:     GlobalHashes:
# CHECK:       Version:          0
# CHECK:       HashAlgorithm:    1
# CHECK:       HashValues:
# CHECK:         - AC2B89A424EC4805
# CHECK:         - 70FA296AAA577E53
# CHECK:         - E2C98293782A7EB4
# CHECK:         - 159516AF20B79286
# CHECK:         - F471B6BDECC99BC9
# CHECK: symbols:
# CHECK:   - Name:            '.debug$T'
# CHECK:     Value:           0
# CHECK:     SectionNumber:   1
# CHECK:     SimpleType:      IMAGE_SYM_TYPE_NULL
# CHECK:     ComplexType:     IMAGE_SYM_DTYPE_NULL
# CHECK:     StorageClass:    IMAGE_SYM_CLASS_STATIC
# CHECK:     SectionDefinition:
# CHECK:       Length:          64
# CHECK:       NumberOfRelocations: 0
# CHECK:       NumberOfLinenumbers: 0
# CHECK:       CheckSum:        0
# CHECK:       Number:          0
# CHECK:   - Name:            '.debug$H'
# CHECK:     Value:           0
# CHECK:     SectionNumber:   2
# CHECK:     SimpleType:      IMAGE_SYM_TYPE_NULL
# CHECK:     ComplexType:     IMAGE_SYM_DTYPE_NULL
# CHECK:     StorageClass:    IMAGE_SYM_CLASS_STATIC
# CHECK:     SectionDefinition:
# CHECK:       Length:          108
# CHECK:       NumberOfRelocations: 0
# CHECK:       NumberOfLinenumbers: 0
# CHECK:       CheckSum:        2189213922
# CHECK:       Number:          1
# CHECK: ...

# HEADERS:   0 .debug$T      00000040 0000000000000000 DATA
# HEADERS:   1 .debug$H      00000030 0000000000000000 DATA