Home | History | Annotate | Download | only in Object
      1 RUN: obj2yaml %p/Inputs/trivial-object-test.coff-i386 | FileCheck %s --check-prefix COFF-I386
      2 RUN: obj2yaml %p/Inputs/trivial-object-test.coff-x86-64 | FileCheck %s --check-prefix COFF-X86-64
      3 
      4 
      5 COFF-I386: header:
      6 COFF-I386-NEXT:  Machine: IMAGE_FILE_MACHINE_I386
      7 
      8 COFF-I386: sections:
      9 COFF-I386-NEXT:  - Name: .text
     10 COFF-I386-NEXT:    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
     11 COFF-I386-NEXT:    Alignment: 16
     12 COFF-I386-NEXT:    SectionData:  83EC0CC744240800000000C7042400000000E800000000E8000000008B44240883C40CC3
     13 
     14 COFF-I386:    Relocations:
     15 COFF-I386-NEXT:      - VirtualAddress: 14
     16 COFF-I386-NEXT:        SymbolName: L_.str
     17 COFF-I386-NEXT:        Type: IMAGE_REL_I386_DIR32
     18 
     19 COFF-I386:           - VirtualAddress: 19
     20 COFF-I386-NEXT:        SymbolName: _puts
     21 COFF-I386-NEXT:        Type: IMAGE_REL_I386_REL32
     22 
     23 COFF-I386:           - VirtualAddress: 24
     24 COFF-I386-NEXT:        SymbolName: _SomeOtherFunction
     25 COFF-I386-NEXT:        Type: IMAGE_REL_I386_REL32
     26 
     27 COFF-I386:       - Name: .data
     28 COFF-I386-NEXT:    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
     29 COFF-I386-NEXT:    Alignment: 1
     30 COFF-I386-NEXT:    SectionData: 48656C6C6F20576F726C642100
     31 
     32 COFF-I386: symbols:
     33 COFF-I386-NEXT:  - Name: .text
     34 COFF-I386-NEXT:    Value: 0
     35 COFF-I386-NEXT:    SectionNumber: 1
     36 COFF-I386-NEXT:    SimpleType: IMAGE_SYM_TYPE_NULL
     37 COFF-I386-NEXT:    ComplexType: IMAGE_SYM_DTYPE_NULL
     38 COFF-I386-NEXT:    StorageClass: IMAGE_SYM_CLASS_STATIC
     39 COFF-I386-NEXT:    NumberOfAuxSymbols: 1
     40 COFF-I386-NEXT:    AuxiliaryData: 240000000300000000000000010000000000
     41 
     42 COFF-I386:       - Name: .data
     43 COFF-I386-NEXT:    Value: 0
     44 COFF-I386-NEXT:    SectionNumber: 2
     45 COFF-I386-NEXT:    SimpleType: IMAGE_SYM_TYPE_NULL
     46 COFF-I386-NEXT:    ComplexType: IMAGE_SYM_DTYPE_NULL
     47 COFF-I386-NEXT:    StorageClass: IMAGE_SYM_CLASS_STATIC
     48 COFF-I386-NEXT:    NumberOfAuxSymbols: 1
     49 COFF-I386-NEXT:    AuxiliaryData: 0D0000000000000000000000020000000000
     50 
     51 COFF-I386:       - Name: _main
     52 COFF-I386-NEXT:    Value: 0
     53 COFF-I386-NEXT:    SectionNumber: 1
     54 COFF-I386-NEXT:    SimpleType: IMAGE_SYM_TYPE_NULL
     55 COFF-I386-NEXT:    ComplexType: IMAGE_SYM_DTYPE_FUNCTION
     56 COFF-I386-NEXT:    StorageClass: IMAGE_SYM_CLASS_EXTERNAL
     57 
     58 COFF-I386:       - Name: L_.str
     59 COFF-I386-NEXT:    Value: 0
     60 COFF-I386-NEXT:    SectionNumber: 2
     61 COFF-I386-NEXT:    SimpleType: IMAGE_SYM_TYPE_NULL
     62 COFF-I386-NEXT:    ComplexType: IMAGE_SYM_DTYPE_NULL
     63 COFF-I386-NEXT:    StorageClass: IMAGE_SYM_CLASS_STATIC
     64 
     65 COFF-I386:       - Name: _puts
     66 COFF-I386-NEXT:    Value: 0
     67 COFF-I386-NEXT:    SectionNumber: 0
     68 COFF-I386-NEXT:    SimpleType: IMAGE_SYM_TYPE_NULL
     69 COFF-I386-NEXT:    ComplexType: IMAGE_SYM_DTYPE_NULL
     70 COFF-I386-NEXT:    StorageClass: IMAGE_SYM_CLASS_EXTERNAL
     71 
     72 COFF-I386:       - Name: _SomeOtherFunction
     73 COFF-I386-NEXT:    Value: 0
     74 COFF-I386-NEXT:    SectionNumber: 0
     75 COFF-I386-NEXT:    SimpleType: IMAGE_SYM_TYPE_NULL
     76 COFF-I386-NEXT:    ComplexType: IMAGE_SYM_DTYPE_NULL
     77 COFF-I386-NEXT:    StorageClass: IMAGE_SYM_CLASS_EXTERNAL
     78 
     79 
     80 COFF-X86-64: header:
     81 COFF-X86-64-NEXT:  Machine: IMAGE_FILE_MACHINE_AMD64
     82 
     83 COFF-X86-64: sections:
     84 COFF-X86-64-NEXT:   - Name: .text
     85 COFF-X86-64-NEXT:     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
     86 COFF-X86-64-NEXT:     Alignment: 16
     87 COFF-X86-64-NEXT:     SectionData: 4883EC28C744242400000000488D0D00000000E800000000E8000000008B4424244883C428C3
     88 
     89 COFF-X86-64:     Relocations:
     90 COFF-X86-64-NEXT:       - VirtualAddress: 15
     91 COFF-X86-64-NEXT:         SymbolName: L.str
     92 COFF-X86-64-NEXT:         Type: IMAGE_REL_AMD64_REL32
     93 
     94 COFF-X86-64:            - VirtualAddress: 20
     95 COFF-X86-64-NEXT:         SymbolName: puts
     96 COFF-X86-64-NEXT:         Type: IMAGE_REL_AMD64_REL32
     97 
     98 COFF-X86-64:            - VirtualAddress: 25
     99 COFF-X86-64-NEXT:         SymbolName: SomeOtherFunction
    100 COFF-X86-64-NEXT:         Type: IMAGE_REL_AMD64_REL32
    101 
    102 COFF-X86-64:        - Name: .data
    103 COFF-X86-64-NEXT:     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
    104 COFF-X86-64-NEXT:     Alignment: 1
    105 COFF-X86-64-NEXT:     SectionData: 48656C6C6F20576F726C642100
    106 
    107 COFF-X86-64: symbols:
    108 COFF-X86-64-NEXT:   - Name: .text
    109 COFF-X86-64-NEXT:     Value: 0
    110 COFF-X86-64-NEXT:     SectionNumber: 1
    111 COFF-X86-64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
    112 COFF-X86-64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
    113 COFF-X86-64-NEXT:     StorageClass: IMAGE_SYM_CLASS_STATIC
    114 COFF-X86-64-NEXT:     NumberOfAuxSymbols: 1
    115 COFF-X86-64-NEXT:     AuxiliaryData: 260000000300000000000000010000000000
    116 
    117 COFF-X86-64:        - Name: .data
    118 COFF-X86-64-NEXT:     Value: 0
    119 COFF-X86-64-NEXT:     SectionNumber: 2
    120 COFF-X86-64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
    121 COFF-X86-64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
    122 COFF-X86-64-NEXT:     StorageClass: IMAGE_SYM_CLASS_STATIC
    123 COFF-X86-64-NEXT:     NumberOfAuxSymbols: 1
    124 COFF-X86-64-NEXT:     AuxiliaryData: 0D0000000000000000000000020000000000
    125 
    126 COFF-X86-64:        - Name: main
    127 COFF-X86-64-NEXT:     Value: 0
    128 COFF-X86-64-NEXT:     SectionNumber: 1
    129 COFF-X86-64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
    130 COFF-X86-64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
    131 COFF-X86-64-NEXT:     StorageClass: IMAGE_SYM_CLASS_EXTERNAL
    132 
    133 COFF-X86-64:        - Name: L.str
    134 COFF-X86-64-NEXT:     Value: 0
    135 COFF-X86-64-NEXT:     SectionNumber: 2
    136 COFF-X86-64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
    137 COFF-X86-64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
    138 COFF-X86-64-NEXT:     StorageClass: IMAGE_SYM_CLASS_STATIC
    139 
    140 COFF-X86-64:        - Name: puts
    141 COFF-X86-64-NEXT:     Value: 0
    142 COFF-X86-64-NEXT:     SectionNumber: 0
    143 COFF-X86-64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
    144 COFF-X86-64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
    145 COFF-X86-64-NEXT:     StorageClass: IMAGE_SYM_CLASS_EXTERNAL
    146 
    147 COFF-X86-64:        - Name: SomeOtherFunction
    148 COFF-X86-64-NEXT:     Value: 0
    149 COFF-X86-64-NEXT:     SectionNumber: 0
    150 COFF-X86-64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
    151 COFF-X86-64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
    152 COFF-X86-64-NEXT:     StorageClass: IMAGE_SYM_CLASS_EXTERNAL
    153 COFF-X86-64-NOT:      NumberOfAuxSymbols
    154