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 RUN: obj2yaml %p/Inputs/trivial-object-test.elf-mipsel | FileCheck %s --check-prefix ELF-MIPSEL
      4 RUN: obj2yaml %p/Inputs/trivial-object-test.elf-mips64el | FileCheck %s --check-prefix ELF-MIPS64EL
      5 RUN: obj2yaml %p/Inputs/trivial-object-test.elf-x86-64 | FileCheck %s --check-prefix ELF-X86-64
      6 RUN: obj2yaml %p/Inputs/trivial-object-test.elf-avr | FileCheck %s --check-prefix ELF-AVR
      7 RUN: obj2yaml %p/Inputs/unwind-section.elf-x86-64 \
      8 RUN:   | FileCheck %s --check-prefix ELF-X86-64-UNWIND
      9 
     10 COFF-I386: header:
     11 COFF-I386-NEXT:  Machine: IMAGE_FILE_MACHINE_I386
     12 
     13 COFF-I386: sections:
     14 COFF-I386-NEXT:  - Name: .text
     15 COFF-I386-NEXT:    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
     16 COFF-I386-NEXT:    Alignment: 16
     17 COFF-I386-NEXT:    SectionData:  83EC0CC744240800000000C7042400000000E800000000E8000000008B44240883C40CC3
     18 
     19 COFF-I386:    Relocations:
     20 COFF-I386-NEXT:      - VirtualAddress: 14
     21 COFF-I386-NEXT:        SymbolName: L_.str
     22 COFF-I386-NEXT:        Type: IMAGE_REL_I386_DIR32
     23 
     24 COFF-I386:           - VirtualAddress: 19
     25 COFF-I386-NEXT:        SymbolName: _puts
     26 COFF-I386-NEXT:        Type: IMAGE_REL_I386_REL32
     27 
     28 COFF-I386:           - VirtualAddress: 24
     29 COFF-I386-NEXT:        SymbolName: _SomeOtherFunction
     30 COFF-I386-NEXT:        Type: IMAGE_REL_I386_REL32
     31 
     32 COFF-I386:       - Name: .data
     33 COFF-I386-NEXT:    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
     34 COFF-I386-NEXT:    Alignment: 1
     35 COFF-I386-NEXT:    SectionData: 48656C6C6F20576F726C642100
     36 
     37 COFF-I386: symbols:
     38 COFF-I386-NEXT:  - Name: .text
     39 COFF-I386-NEXT:    Value: 0
     40 COFF-I386-NEXT:    SectionNumber: 1
     41 COFF-I386-NEXT:    SimpleType: IMAGE_SYM_TYPE_NULL
     42 COFF-I386-NEXT:    ComplexType: IMAGE_SYM_DTYPE_NULL
     43 COFF-I386-NEXT:    StorageClass: IMAGE_SYM_CLASS_STATIC
     44 COFF-I386-NEXT:    SectionDefinition:
     45 COFF-I386-NEXT:      Length:          36
     46 COFF-I386-NEXT:      NumberOfRelocations: 3
     47 COFF-I386-NEXT:      NumberOfLinenumbers: 0
     48 COFF-I386-NEXT:      CheckSum:        0
     49 COFF-I386-NEXT:      Number:          1
     50 
     51 COFF-I386:       - Name: .data
     52 COFF-I386-NEXT:    Value: 0
     53 COFF-I386-NEXT:    SectionNumber: 2
     54 COFF-I386-NEXT:    SimpleType: IMAGE_SYM_TYPE_NULL
     55 COFF-I386-NEXT:    ComplexType: IMAGE_SYM_DTYPE_NULL
     56 COFF-I386-NEXT:    StorageClass: IMAGE_SYM_CLASS_STATIC
     57 COFF-I386-NEXT:    SectionDefinition:
     58 COFF-I386-NEXT:      Length:          13
     59 COFF-I386-NEXT:      NumberOfRelocations: 0
     60 COFF-I386-NEXT:      NumberOfLinenumbers: 0
     61 COFF-I386-NEXT:      CheckSum:        0
     62 COFF-I386-NEXT:      Number:          2
     63 
     64 COFF-I386:       - Name: _main
     65 COFF-I386-NEXT:    Value: 0
     66 COFF-I386-NEXT:    SectionNumber: 1
     67 COFF-I386-NEXT:    SimpleType: IMAGE_SYM_TYPE_NULL
     68 COFF-I386-NEXT:    ComplexType: IMAGE_SYM_DTYPE_FUNCTION
     69 COFF-I386-NEXT:    StorageClass: IMAGE_SYM_CLASS_EXTERNAL
     70 
     71 COFF-I386:       - Name: L_.str
     72 COFF-I386-NEXT:    Value: 0
     73 COFF-I386-NEXT:    SectionNumber: 2
     74 COFF-I386-NEXT:    SimpleType: IMAGE_SYM_TYPE_NULL
     75 COFF-I386-NEXT:    ComplexType: IMAGE_SYM_DTYPE_NULL
     76 COFF-I386-NEXT:    StorageClass: IMAGE_SYM_CLASS_STATIC
     77 
     78 COFF-I386:       - Name: _puts
     79 COFF-I386-NEXT:    Value: 0
     80 COFF-I386-NEXT:    SectionNumber: 0
     81 COFF-I386-NEXT:    SimpleType: IMAGE_SYM_TYPE_NULL
     82 COFF-I386-NEXT:    ComplexType: IMAGE_SYM_DTYPE_NULL
     83 COFF-I386-NEXT:    StorageClass: IMAGE_SYM_CLASS_EXTERNAL
     84 
     85 COFF-I386:       - Name: _SomeOtherFunction
     86 COFF-I386-NEXT:    Value: 0
     87 COFF-I386-NEXT:    SectionNumber: 0
     88 COFF-I386-NEXT:    SimpleType: IMAGE_SYM_TYPE_NULL
     89 COFF-I386-NEXT:    ComplexType: IMAGE_SYM_DTYPE_NULL
     90 COFF-I386-NEXT:    StorageClass: IMAGE_SYM_CLASS_EXTERNAL
     91 
     92 
     93 COFF-X86-64: header:
     94 COFF-X86-64-NEXT:  Machine: IMAGE_FILE_MACHINE_AMD64
     95 
     96 COFF-X86-64: sections:
     97 COFF-X86-64-NEXT:   - Name: .text
     98 COFF-X86-64-NEXT:     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
     99 COFF-X86-64-NEXT:     Alignment: 16
    100 COFF-X86-64-NEXT:     SectionData: 4883EC28C744242400000000488D0D00000000E800000000E8000000008B4424244883C428C3
    101 
    102 COFF-X86-64:     Relocations:
    103 COFF-X86-64-NEXT:       - VirtualAddress: 15
    104 COFF-X86-64-NEXT:         SymbolName: L.str
    105 COFF-X86-64-NEXT:         Type: IMAGE_REL_AMD64_REL32
    106 
    107 COFF-X86-64:            - VirtualAddress: 20
    108 COFF-X86-64-NEXT:         SymbolName: puts
    109 COFF-X86-64-NEXT:         Type: IMAGE_REL_AMD64_REL32
    110 
    111 COFF-X86-64:            - VirtualAddress: 25
    112 COFF-X86-64-NEXT:         SymbolName: SomeOtherFunction
    113 COFF-X86-64-NEXT:         Type: IMAGE_REL_AMD64_REL32
    114 
    115 COFF-X86-64:        - Name: .data
    116 COFF-X86-64-NEXT:     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
    117 COFF-X86-64-NEXT:     Alignment: 1
    118 COFF-X86-64-NEXT:     SectionData: 48656C6C6F20576F726C642100
    119 
    120 COFF-X86-64:        - Name: '.CRT$XCU'
    121 COFF-X86-64-NEXT:     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
    122 COFF-X86-64-NEXT:     Alignment: 8
    123 COFF-X86-64-NEXT:     SectionData:  '0000000000000000'
    124 
    125 COFF-X86-64:     Relocations:
    126 COFF-X86-64-NEXT:       - VirtualAddress: 0
    127 COFF-X86-64-NEXT:         SymbolName: '??__Ex@@YAXXZ'
    128 COFF-X86-64-NEXT:         Type: IMAGE_REL_AMD64_ADDR64
    129 
    130 COFF-X86-64: symbols:
    131 COFF-X86-64-NEXT:   - Name: .text
    132 COFF-X86-64-NEXT:     Value: 0
    133 COFF-X86-64-NEXT:     SectionNumber: 1
    134 COFF-X86-64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
    135 COFF-X86-64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
    136 COFF-X86-64-NEXT:     StorageClass: IMAGE_SYM_CLASS_STATIC
    137 COFF-X86-64-NEXT:    SectionDefinition:
    138 COFF-X86-64-NEXT:      Length:          38
    139 COFF-X86-64-NEXT:      NumberOfRelocations: 3
    140 COFF-X86-64-NEXT:      NumberOfLinenumbers: 0
    141 COFF-X86-64-NEXT:      CheckSum:        0
    142 COFF-X86-64-NEXT:      Number:          1
    143 
    144 COFF-X86-64:        - Name: .data
    145 COFF-X86-64-NEXT:     Value: 0
    146 COFF-X86-64-NEXT:     SectionNumber: 2
    147 COFF-X86-64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
    148 COFF-X86-64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
    149 COFF-X86-64-NEXT:     StorageClass: IMAGE_SYM_CLASS_STATIC
    150 COFF-X86-64-NEXT:    SectionDefinition:
    151 COFF-X86-64-NEXT:      Length:          13
    152 COFF-X86-64-NEXT:      NumberOfRelocations: 0
    153 COFF-X86-64-NEXT:      NumberOfLinenumbers: 0
    154 COFF-X86-64-NEXT:      CheckSum:        0
    155 COFF-X86-64-NEXT:      Number:          2
    156 
    157 COFF-X86-64:        - Name: main
    158 COFF-X86-64-NEXT:     Value: 0
    159 COFF-X86-64-NEXT:     SectionNumber: 1
    160 COFF-X86-64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
    161 COFF-X86-64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_FUNCTION
    162 COFF-X86-64-NEXT:     StorageClass: IMAGE_SYM_CLASS_EXTERNAL
    163 
    164 COFF-X86-64:        - Name: L.str
    165 COFF-X86-64-NEXT:     Value: 0
    166 COFF-X86-64-NEXT:     SectionNumber: 2
    167 COFF-X86-64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
    168 COFF-X86-64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
    169 COFF-X86-64-NEXT:     StorageClass: IMAGE_SYM_CLASS_STATIC
    170 
    171 COFF-X86-64:        - Name: puts
    172 COFF-X86-64-NEXT:     Value: 0
    173 COFF-X86-64-NEXT:     SectionNumber: 0
    174 COFF-X86-64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
    175 COFF-X86-64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
    176 COFF-X86-64-NEXT:     StorageClass: IMAGE_SYM_CLASS_EXTERNAL
    177 
    178 COFF-X86-64:        - Name: SomeOtherFunction
    179 COFF-X86-64-NEXT:     Value: 0
    180 COFF-X86-64-NEXT:     SectionNumber: 0
    181 COFF-X86-64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
    182 COFF-X86-64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
    183 COFF-X86-64-NEXT:     StorageClass: IMAGE_SYM_CLASS_EXTERNAL
    184 
    185 COFF-X86-64:        - Name: '??__Ex@@YAXXZ'
    186 COFF-X86-64-NEXT:     Value: 0
    187 COFF-X86-64-NEXT:     SectionNumber: 3
    188 COFF-X86-64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
    189 COFF-X86-64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_FUNCTION
    190 COFF-X86-64-NEXT:     StorageClass: IMAGE_SYM_CLASS_STATIC
    191 
    192 ELF-MIPSEL:      FileHeader:
    193 ELF-MIPSEL-NEXT:   Class:           ELFCLASS32
    194 ELF-MIPSEL-NEXT:   Data:            ELFDATA2LSB
    195 ELF-MIPSEL-NEXT:   OSABI:           ELFOSABI_GNU
    196 ELF-MIPSEL-NEXT:   Type:            ET_REL
    197 ELF-MIPSEL-NEXT:   Machine:         EM_MIPS
    198 ELF-MIPSEL-NEXT:   Flags:           [ EF_MIPS_NOREORDER, EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_ABI_O32, EF_MIPS_ARCH_32 ]
    199 ELF-MIPSEL-NEXT: Sections:
    200 ELF-MIPSEL-NEXT:   - Name:            .text
    201 ELF-MIPSEL-NEXT:     Type:            SHT_PROGBITS
    202 ELF-MIPSEL-NEXT:     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
    203 ELF-MIPSEL-NEXT:     AddressAlign:    0x0000000000000004
    204 ELF-MIPSEL-NEXT:     Content:         0000023C00004224E8FFBD271400BFAF1000B0AF218059000000018E000024240000198E09F8200321E000020000198E09F8200321E00002000002241000B08F1400BF8F0800E0031800BD27
    205 ELF-MIPSEL-NEXT:   - Name:            .rel.text
    206 ELF-MIPSEL-NEXT:     Type:            SHT_REL
    207 ELF-MIPSEL-NEXT:     Link:            .symtab
    208 ELF-MIPSEL-NEXT:     AddressAlign:    0x0000000000000004
    209 ELF-MIPSEL-NEXT:     Info:            .text
    210 ELF-MIPSEL-NEXT:     Relocations:
    211 ELF-MIPSEL-NEXT:       - Offset:          0x0000000000000000
    212 ELF-MIPSEL-NEXT:         Symbol:          _gp_disp
    213 ELF-MIPSEL-NEXT:         Type:            R_MIPS_HI16
    214 ELF-MIPSEL-NEXT:       - Offset:          0x0000000000000004
    215 ELF-MIPSEL-NEXT:         Symbol:          _gp_disp
    216 ELF-MIPSEL-NEXT:         Type:            R_MIPS_LO16
    217 ELF-MIPSEL-NEXT:       - Offset:          0x0000000000000018
    218 ELF-MIPSEL-NEXT:         Symbol:          '$.str'
    219 ELF-MIPSEL-NEXT:         Type:            R_MIPS_GOT16
    220 ELF-MIPSEL-NEXT:       - Offset:          0x000000000000001C
    221 ELF-MIPSEL-NEXT:         Symbol:          '$.str'
    222 ELF-MIPSEL-NEXT:         Type:            R_MIPS_LO16
    223 ELF-MIPSEL-NEXT:       - Offset:          0x0000000000000020
    224 ELF-MIPSEL-NEXT:         Symbol:          puts
    225 ELF-MIPSEL-NEXT:         Type:            R_MIPS_CALL16
    226 ELF-MIPSEL-NEXT:       - Offset:          0x000000000000002C
    227 ELF-MIPSEL-NEXT:         Symbol:          SomeOtherFunction
    228 ELF-MIPSEL-NEXT:         Type:            R_MIPS_CALL16
    229 ELF-MIPSEL-NEXT:   - Name:            .data
    230 ELF-MIPSEL-NEXT:     Type:            SHT_PROGBITS
    231 ELF-MIPSEL-NEXT:     Flags:           [ SHF_WRITE, SHF_ALLOC ]
    232 ELF-MIPSEL-NEXT:     AddressAlign:    0x0000000000000004
    233 ELF-MIPSEL-NEXT:     Content:         ''
    234 ELF-MIPSEL-NEXT:   - Name:            .bss
    235 ELF-MIPSEL-NEXT:     Type:            SHT_NOBITS
    236 ELF-MIPSEL-NEXT:     Flags:           [ SHF_WRITE, SHF_ALLOC ]
    237 ELF-MIPSEL-NEXT:     AddressAlign:    0x0000000000000004
    238 ELF-MIPSEL-NEXT:     Size:            0x0000000000000004
    239 ELF-MIPSEL-NEXT:   - Name:            .mdebug.abi32
    240 ELF-MIPSEL-NEXT:     Type:            SHT_PROGBITS
    241 ELF-MIPSEL-NEXT:     AddressAlign:    0x0000000000000001
    242 ELF-MIPSEL-NEXT:     Content:         ''
    243 ELF-MIPSEL-NEXT:   - Name:            .rodata.str1.1
    244 ELF-MIPSEL-NEXT:     Type:            SHT_PROGBITS
    245 ELF-MIPSEL-NEXT:     Flags:           [ SHF_ALLOC, SHF_MERGE, SHF_STRINGS ]
    246 ELF-MIPSEL-NEXT:     AddressAlign:    0x0000000000000001
    247 ELF-MIPSEL-NEXT:     Content:         48656C6C6F20576F726C640A00
    248 ELF-MIPSEL-NEXT:   - Name:            .reginfo
    249 ELF-MIPSEL-NEXT:     Type:            SHT_MIPS_REGINFO
    250 ELF-MIPSEL-NEXT:     Flags:           [ SHF_ALLOC ]
    251 ELF-MIPSEL-NEXT:     AddressAlign:    0x0000000000000001
    252 ELF-MIPSEL-NEXT:     Content:         '000000000000000000000000000000000000000000000000'
    253 ELF-MIPSEL-NEXT:   - Name:            .MIPS.abiflags
    254 ELF-MIPSEL-NEXT:     Type:            SHT_MIPS_ABIFLAGS
    255 ELF-MIPSEL-NEXT:     Flags:           [ SHF_ALLOC ]
    256 ELF-MIPSEL-NEXT:     AddressAlign:    0x0000000000000008
    257 ELF-MIPSEL-NEXT:     ISA:             MIPS32
    258 ELF-MIPSEL-NEXT:     ISARevision:     0x01
    259 ELF-MIPSEL-NEXT:     FpABI:           FP_DOUBLE
    260 ELF-MIPSEL-NEXT:     GPRSize:         REG_32
    261 ELF-MIPSEL-NEXT:     CPR1Size:        REG_32
    262 ELF-MIPSEL-NEXT:     Flags1:          [ ODDSPREG ]
    263 ELF-MIPSEL-NEXT: Symbols:
    264 ELF-MIPSEL-NEXT:   Local:
    265 ELF-MIPSEL-NEXT:     - Name:            trivial.ll
    266 ELF-MIPSEL-NEXT:       Type:            STT_FILE
    267 ELF-MIPSEL-NEXT:     - Name:            '$.str'
    268 ELF-MIPSEL-NEXT:       Type:            STT_OBJECT
    269 ELF-MIPSEL-NEXT:       Section:         .rodata.str1.1
    270 ELF-MIPSEL-NEXT:       Size:            0x000000000000000D
    271 ELF-MIPSEL-NEXT:     - Type:            STT_SECTION
    272 ELF-MIPSEL-NEXT:       Section:         .text
    273 ELF-MIPSEL-NEXT:     - Type:            STT_SECTION
    274 ELF-MIPSEL-NEXT:       Section:         .data
    275 ELF-MIPSEL-NEXT:     - Type:            STT_SECTION
    276 ELF-MIPSEL-NEXT:       Section:         .bss
    277 ELF-MIPSEL-NEXT:     - Type:            STT_SECTION
    278 ELF-MIPSEL-NEXT:       Section:         .mdebug.abi32
    279 ELF-MIPSEL-NEXT:     - Type:            STT_SECTION
    280 ELF-MIPSEL-NEXT:       Section:         .rodata.str1.1
    281 ELF-MIPSEL-NEXT:     - Type:            STT_SECTION
    282 ELF-MIPSEL-NEXT:       Section:         .reginfo
    283 ELF-MIPSEL-NEXT:     - Type:            STT_SECTION
    284 ELF-MIPSEL-NEXT:       Section:         .MIPS.abiflags
    285 ELF-MIPSEL-NEXT:   Global:
    286 ELF-MIPSEL-NEXT:     - Name:            main
    287 ELF-MIPSEL-NEXT:       Type:            STT_FUNC
    288 ELF-MIPSEL-NEXT:       Section:         .text
    289 ELF-MIPSEL-NEXT:       Size:            0x000000000000004C
    290 ELF-MIPSEL-NEXT:     - Name:            var
    291 ELF-MIPSEL-NEXT:       Type:            STT_OBJECT
    292 ELF-MIPSEL-NEXT:       Section:         .bss
    293 ELF-MIPSEL-NEXT:       Size:            0x0000000000000004
    294 ELF-MIPSEL-NEXT:     - Name:            SomeOtherFunction
    295 ELF-MIPSEL-NEXT:     - Name:            _gp_disp
    296 ELF-MIPSEL-NEXT:     - Name:            puts
    297 
    298 ELF-MIPS64EL:      FileHeader:
    299 ELF-MIPS64EL-NEXT:   Class:           ELFCLASS64
    300 ELF-MIPS64EL-NEXT:   Data:            ELFDATA2LSB
    301 ELF-MIPS64EL-NEXT:   Type:            ET_REL
    302 ELF-MIPS64EL-NEXT:   Machine:         EM_MIPS
    303 ELF-MIPS64EL-NEXT:   Flags:           [ EF_MIPS_ARCH_3 ]
    304 ELF-MIPS64EL-NEXT: Sections:
    305 ELF-MIPS64EL-NEXT:   - Name:            .text
    306 ELF-MIPS64EL-NEXT:     Type:            SHT_PROGBITS
    307 ELF-MIPS64EL-NEXT:     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
    308 ELF-MIPS64EL-NEXT:     AddressAlign:    0x0000000000000010
    309 ELF-MIPS64EL-NEXT:     Content:         ''
    310 ELF-MIPS64EL-NEXT:   - Name:            .data
    311 ELF-MIPS64EL-NEXT:     Type:            SHT_PROGBITS
    312 ELF-MIPS64EL-NEXT:     Flags:           [ SHF_WRITE, SHF_ALLOC ]
    313 ELF-MIPS64EL-NEXT:     AddressAlign:    0x0000000000000010
    314 ELF-MIPS64EL-NEXT:     Content:         '00000000000000000000000000000000'
    315 ELF-MIPS64EL-NEXT:   - Name:            .rela.data
    316 ELF-MIPS64EL-NEXT:     Type:            SHT_RELA
    317 ELF-MIPS64EL-NEXT:     Link:            .symtab
    318 ELF-MIPS64EL-NEXT:     AddressAlign:    0x0000000000000008
    319 ELF-MIPS64EL-NEXT:     Info:            .data
    320 ELF-MIPS64EL-NEXT:     Relocations:
    321 ELF-MIPS64EL-NEXT:       - Offset:          0
    322 ELF-MIPS64EL-NEXT:         Symbol:          zed
    323 ELF-MIPS64EL-NEXT:         Type:            R_MIPS_64
    324 ELF-MIPS64EL-NEXT:   - Name:            .bss
    325 ELF-MIPS64EL-NEXT:     Type:            SHT_NOBITS
    326 ELF-MIPS64EL-NEXT:     Flags:           [ SHF_WRITE, SHF_ALLOC ]
    327 ELF-MIPS64EL-NEXT:     AddressAlign:    0x0000000000000010
    328 ELF-MIPS64EL-NEXT:   - Name:            .MIPS.options
    329 ELF-MIPS64EL-NEXT:     Type:            SHT_MIPS_OPTIONS
    330 ELF-MIPS64EL-NEXT:     Flags:           [ SHF_ALLOC ]
    331 ELF-MIPS64EL-NEXT:     AddressAlign:    0x0000000000000008
    332 ELF-MIPS64EL-NEXT:     Content:         '01280000000000000000000000000000000000000000000000000000000000000000000000000000'
    333 ELF-MIPS64EL-NEXT:   - Name:            .pdr
    334 ELF-MIPS64EL-NEXT:     Type:            SHT_PROGBITS
    335 ELF-MIPS64EL-NEXT:     AddressAlign:    0x0000000000000004
    336 ELF-MIPS64EL-NEXT:     Content:         ''
    337 ELF-MIPS64EL-NEXT: Symbols:
    338 ELF-MIPS64EL-NEXT:   Local:
    339 ELF-MIPS64EL-NEXT:     - Type:            STT_SECTION
    340 ELF-MIPS64EL-NEXT:       Section:         .text
    341 ELF-MIPS64EL-NEXT:     - Type:            STT_SECTION
    342 ELF-MIPS64EL-NEXT:       Section:         .data
    343 ELF-MIPS64EL-NEXT:     - Type:            STT_SECTION
    344 ELF-MIPS64EL-NEXT:       Section:         .bss
    345 ELF-MIPS64EL-NEXT:     - Name:            bar
    346 ELF-MIPS64EL-NEXT:       Section:         .data
    347 ELF-MIPS64EL-NEXT:     - Type:            STT_SECTION
    348 ELF-MIPS64EL-NEXT:       Section:         .MIPS.options
    349 ELF-MIPS64EL-NEXT:     - Type:            STT_SECTION
    350 ELF-MIPS64EL-NEXT:       Section:         .pdr
    351 ELF-MIPS64EL-NEXT:   Global:
    352 ELF-MIPS64EL-NEXT:     - Name:            zed
    353 
    354 ELF-X86-64:      FileHeader:
    355 ELF-X86-64-NEXT:   Class:           ELFCLASS64
    356 ELF-X86-64-NEXT:   Data:            ELFDATA2LSB
    357 ELF-X86-64-NEXT:   OSABI:           ELFOSABI_GNU
    358 ELF-X86-64-NEXT:   Type:            ET_REL
    359 ELF-X86-64-NEXT:   Machine:         EM_X86_64
    360 ELF-X86-64-NEXT: Sections:
    361 ELF-X86-64-NEXT:   - Name:            .text
    362 ELF-X86-64-NEXT:     Type:            SHT_PROGBITS
    363 ELF-X86-64-NEXT:     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
    364 ELF-X86-64-NEXT:     AddressAlign:    0x0000000000000010
    365 ELF-X86-64-NEXT:     Content:         4883EC08C744240400000000BF00000000E80000000030C0E8000000008B4424044883C408C3
    366 ELF-X86-64-NEXT:   - Name:            .rodata.str1.1
    367 ELF-X86-64-NEXT:     Type:            SHT_PROGBITS
    368 ELF-X86-64-NEXT:     Flags:           [ SHF_ALLOC, SHF_MERGE, SHF_STRINGS ]
    369 ELF-X86-64-NEXT:     Address:         0x0000000000000026
    370 ELF-X86-64-NEXT:     AddressAlign:    0x0000000000000001
    371 ELF-X86-64-NEXT:     Content:         48656C6C6F20576F726C642100
    372 ELF-X86-64-NEXT:   - Name:            .note.GNU-stack
    373 ELF-X86-64-NEXT:     Type:            SHT_PROGBITS
    374 ELF-X86-64-NEXT:     Address:         0x0000000000000033
    375 ELF-X86-64-NEXT:     AddressAlign:    0x0000000000000001
    376 ELF-X86-64-NEXT:     Content:         ''
    377 ELF-X86-64-NEXT:   - Name:            .rela.text
    378 ELF-X86-64-NEXT:     Type:            SHT_RELA
    379 ELF-X86-64-NEXT:     Address:         0x0000000000000038
    380 ELF-X86-64-NEXT:     Link:            .symtab
    381 ELF-X86-64-NEXT:     AddressAlign:    0x0000000000000008
    382 ELF-X86-64-NEXT:     Info:            .text
    383 ELF-X86-64-NEXT:     Relocations:
    384 ELF-X86-64-NEXT:       - Offset:          0x000000000000000D
    385 ELF-X86-64-NEXT:         Symbol:          ''
    386 ELF-X86-64-NEXT:         Type:            R_X86_64_32S
    387 ELF-X86-64-NEXT:       - Offset:          0x0000000000000012
    388 ELF-X86-64-NEXT:         Symbol:          puts
    389 ELF-X86-64-NEXT:         Type:            R_X86_64_PC32
    390 ELF-X86-64-NEXT:         Addend:          -4
    391 ELF-X86-64-NEXT:       - Offset:          0x0000000000000019
    392 ELF-X86-64-NEXT:         Symbol:          SomeOtherFunction
    393 ELF-X86-64-NEXT:         Type:            R_X86_64_PC32
    394 ELF-X86-64-NEXT:         Addend:          -4
    395 ELF-X86-64-NEXT: Symbols:
    396 ELF-X86-64-NEXT:   Local:
    397 ELF-X86-64-NEXT:     - Name:            trivial-object-test.s
    398 ELF-X86-64-NEXT:       Type:            STT_FILE
    399 ELF-X86-64-NEXT:     - Type:            STT_SECTION
    400 ELF-X86-64-NEXT:       Section:         .text
    401 ELF-X86-64-NEXT:     - Type:            STT_SECTION
    402 ELF-X86-64-NEXT:       Section:         .rodata.str1.1
    403 ELF-X86-64-NEXT:     - Type:            STT_SECTION
    404 ELF-X86-64-NEXT:       Section:         .note.GNU-stack
    405 ELF-X86-64-NEXT:   Global:
    406 ELF-X86-64-NEXT:     - Name:            main
    407 ELF-X86-64-NEXT:       Type:            STT_FUNC
    408 ELF-X86-64-NEXT:       Section:         .text
    409 ELF-X86-64-NEXT:       Size:            0x0000000000000026
    410 ELF-X86-64-NEXT:     - Name:            SomeOtherFunction
    411 ELF-X86-64-NEXT:     - Name:            puts
    412 
    413 
    414 ELF-AVR:      FileHeader:      
    415 ELF-AVR-NEXT:   Class:           ELFCLASS32
    416 ELF-AVR-NEXT:   Data:            ELFDATA2LSB
    417 ELF-AVR-NEXT:   Type:            ET_EXEC
    418 ELF-AVR-NEXT:   Machine:         EM_AVR
    419 ELF-AVR-NEXT:   Flags:           [ EF_AVR_ARCH_AVR2 ]
    420 ELF-AVR-NEXT: Sections:        
    421 ELF-AVR-NEXT:   - Name:            .text
    422 ELF-AVR-NEXT:     Type:            SHT_PROGBITS
    423 ELF-AVR-NEXT:     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
    424 ELF-AVR-NEXT:     AddressAlign:    0x0000000000000002
    425 ELF-AVR-NEXT:     Content:         C20E0895
    426 ELF-AVR-NEXT:   - Name:            .data
    427 ELF-AVR-NEXT:     Type:            SHT_PROGBITS
    428 ELF-AVR-NEXT:     Flags:           [ SHF_WRITE, SHF_ALLOC ]
    429 ELF-AVR-NEXT:     Address:         0x0000000000800060
    430 ELF-AVR-NEXT:     AddressAlign:    0x0000000000000001
    431 ELF-AVR-NEXT:     Content:         ''
    432 ELF-AVR-NEXT: Symbols:         
    433 ELF-AVR-NEXT:   Local:           
    434 ELF-AVR-NEXT:     - Type:            STT_SECTION
    435 ELF-AVR-NEXT:       Section:         .text
    436 ELF-AVR-NEXT:     - Type:            STT_SECTION
    437 ELF-AVR-NEXT:       Section:         .data
    438 ELF-AVR-NEXT:       Value:           0x0000000000800060
    439 ELF-AVR-NEXT:     - Name:            a.o
    440 ELF-AVR-NEXT:       Type:            STT_FILE
    441 ELF-AVR-NEXT:     - Name:            main
    442 ELF-AVR-NEXT:       Section:         .text
    443 ELF-AVR-NEXT:   Global:          
    444 ELF-AVR-NEXT:     - Name:            __trampolines_start
    445 ELF-AVR-NEXT:       Section:         .text
    446 ELF-AVR-NEXT:     - Name:            _etext
    447 ELF-AVR-NEXT:       Section:         .text
    448 ELF-AVR-NEXT:       Value:           0x0000000000000004
    449 ELF-AVR-NEXT:     - Name:            __data_load_end
    450 ELF-AVR-NEXT:       Value:           0x0000000000000004
    451 ELF-AVR-NEXT:     - Name:            __trampolines_end
    452 ELF-AVR-NEXT:       Section:         .text
    453 ELF-AVR-NEXT:     - Name:            __data_load_start
    454 ELF-AVR-NEXT:       Value:           0x0000000000000004
    455 ELF-AVR-NEXT:     - Name:            __dtors_end
    456 ELF-AVR-NEXT:       Section:         .text
    457 ELF-AVR-NEXT:     - Name:            __eeprom_end
    458 ELF-AVR-NEXT:       Section:         .data
    459 ELF-AVR-NEXT:       Value:           0x0000000000810000
    460 ELF-AVR-NEXT:     - Name:            __ctors_start
    461 ELF-AVR-NEXT:       Section:         .text
    462 ELF-AVR-NEXT:     - Name:            __dtors_start
    463 ELF-AVR-NEXT:       Section:         .text
    464 ELF-AVR-NEXT:     - Name:            __ctors_end
    465 ELF-AVR-NEXT:       Section:         .text
    466 ELF-AVR-NEXT:     - Name:            _edata
    467 ELF-AVR-NEXT:       Section:         .data
    468 ELF-AVR-NEXT:       Value:           0x0000000000800060
    469 ELF-AVR-NEXT:     - Name:            _end
    470 ELF-AVR-NEXT:       Section:         .data
    471 ELF-AVR-NEXT:       Value:           0x0000000000800060
    472 
    473 
    474 ELF-X86-64-UNWIND:      - Name:            .eh_frame
    475 ELF-X86-64-UNWIND-NEXT:   Type:            SHT_X86_64_UNWIND
    476 ELF-X86-64-UNWIND-NEXT:   Flags:           [ SHF_ALLOC ]
    477 ELF-X86-64-UNWIND-NEXT:   AddressAlign:    0x0000000000000001
    478 ELF-X86-64-UNWIND-NEXT:   Content:         ''
    479 
    480 RUN: not obj2yaml %t.blah 2>&1 | FileCheck --check-prefix=ENOENT %s
    481 ENOENT: Error: '{{[Nn]}}o such file or directory'
    482