llvm/llvm/test/tools/yaml2obj/XCOFF/full-contents.yaml

## Test that we can explicitly specify all the fields.
# RUN: yaml2obj %s -o %t
# RUN: llvm-readobj --headers --symbols %t | FileCheck %s

--- !XCOFF
FileHeader:
  MagicNumber:          0x1DF
  NumberOfSections:     2
  CreationTime:         0
  OffsetToSymbolTable:  0x7A
  EntriesInSymbolTable: 4
  AuxiliaryHeaderSize:  0
  Flags:                0x0
Sections:
  - Name:                    .text
    Address:                 0x0
    Size:                    0x8
    FileOffsetToData:        0x64
    FileOffsetToRelocations: 0x0
    FileOffsetToLineNumbers: 0x0
    NumberOfRelocations:     0x0
    NumberOfLineNumbers:     0x0
    Flags:                   [ STYP_TEXT ]
    SectionData:             "3860000048"
  - Name:                    .data
    Address:                 0x8
    Size:                    0x4
    FileOffsetToData:        0x6C
    FileOffsetToRelocations: 0x70
    FileOffsetToLineNumbers: 0x0
    NumberOfRelocations:     0x1
    NumberOfLineNumbers:     0x0
    Flags:                   [ STYP_DATA ]
    SectionData:             "00000088"
    Relocations:
      - Address:         0x80
        Symbol:          0x21
        Info:            0x1F
        Type:            0x0
Symbols:
  - Name:               .text
    Value:              0x0
    Section:            .text
    Type:               0x0
    StorageClass:       C_STAT
    NumberOfAuxEntries: 1
  - Name:               .data
    Value:              0x80
    Section:            .data
    Type:               0x0
    StorageClass:       C_STAT
    NumberOfAuxEntries: 1

# CHECK:      FileHeader {
# CHECK-NEXT:   Magic: 0x1DF
# CHECK-NEXT:   NumberOfSections: 2
# CHECK-NEXT:   TimeStamp: None (0x0)
# CHECK-NEXT:   SymbolTableOffset: 0x7A
# CHECK-NEXT:   SymbolTableEntries: 4
# CHECK-NEXT:   OptionalHeaderSize: 0x0
# CHECK-NEXT:   Flags: 0x0
# CHECK-NEXT: }
# CHECK-NEXT: AuxiliaryHeader {
# CHECK-NEXT: }
# CHECK-NEXT: Sections [
# CHECK-NEXT:   Section {
# CHECK-NEXT:     Index: 1
# CHECK-NEXT:     Name: .text
# CHECK-NEXT:     PhysicalAddress: 0x0
# CHECK-NEXT:     VirtualAddress: 0x0
# CHECK-NEXT:     Size: 0x8
# CHECK-NEXT:     RawDataOffset: 0x64
# CHECK-NEXT:     RelocationPointer: 0x0
# CHECK-NEXT:     LineNumberPointer: 0x0
# CHECK-NEXT:     NumberOfRelocations: 0
# CHECK-NEXT:     NumberOfLineNumbers: 0
# CHECK-NEXT:     Type: STYP_TEXT (0x20)
# CHECK-NEXT:   }
# CHECK-NEXT:   Section {
# CHECK-NEXT:     Index: 2
# CHECK-NEXT:     Name: .data
# CHECK-NEXT:     PhysicalAddress: 0x8
# CHECK-NEXT:     VirtualAddress: 0x8
# CHECK-NEXT:     Size: 0x4
# CHECK-NEXT:     RawDataOffset: 0x6C
# CHECK-NEXT:     RelocationPointer: 0x70
# CHECK-NEXT:     LineNumberPointer: 0x0
# CHECK-NEXT:     NumberOfRelocations: 1
# CHECK-NEXT:     NumberOfLineNumbers: 0
# CHECK-NEXT:     Type: STYP_DATA (0x40)
# CHECK-NEXT:   }
# CHECK-NEXT: ]
# CHECK-NEXT: Symbols [
# CHECK-NEXT:   Symbol {
# CHECK-NEXT:     Index: 0
# CHECK-NEXT:     Name: .text
# CHECK-NEXT:     Value (RelocatableAddress): 0x0
# CHECK-NEXT:     Section: .text
# CHECK-NEXT:     Type: 0x0
# CHECK-NEXT:     StorageClass: C_STAT (0x3)
# CHECK-NEXT:     NumberOfAuxEntries: 1
# CHECK-NEXT:     Sect Auxiliary Entry For Stat {
# CHECK-NEXT:       Index: 1
# CHECK-NEXT:       SectionLength: 0
# CHECK-NEXT:       NumberOfRelocEnt: 0
# CHECK-NEXT:       NumberOfLineNum: 0
# CHECK-NEXT:     }
# CHECK-NEXT:   }
# CHECK-NEXT:   Symbol {
# CHECK-NEXT:     Index: 2
# CHECK-NEXT:     Name: .data
# CHECK-NEXT:     Value (RelocatableAddress): 0x80
# CHECK-NEXT:     Section: .data
# CHECK-NEXT:     Type: 0x0
# CHECK-NEXT:     StorageClass: C_STAT (0x3)
# CHECK-NEXT:     NumberOfAuxEntries: 1
# CHECK-NEXT:     Sect Auxiliary Entry For Stat {
# CHECK-NEXT:       Index: 3
# CHECK-NEXT:       SectionLength: 0
# CHECK-NEXT:       NumberOfRelocEnt: 0
# CHECK-NEXT:       NumberOfLineNum: 0
# CHECK-NEXT:     }
# CHECK-NEXT:   }
# CHECK-NEXT: ]