[Object] Don't crash on empty export lists.
[oota-llvm.git] / test / Object / X86 / yaml2obj-elf-x86-rel.yaml
1 # RUN: yaml2obj -format=elf %s > %t
2 # RUN: llvm-readobj -r %t | FileCheck %s
3
4 # CHECK:      Relocations [
5 # CHECK-NEXT:   Section (2) .rel.text {
6 # CHECK-NEXT:     0x0 R_386_32 main 0x0
7 # CHECK-NEXT:   }
8 # CHECK-NEXT: ]
9
10 FileHeader:
11   Class:           ELFCLASS32
12   Data:            ELFDATA2LSB
13   Type:            ET_REL
14   Machine:         EM_386
15 Sections:
16   - Type:            SHT_PROGBITS
17     Name:            .text
18     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
19     AddressAlign:    0x04
20     Content:         0000000000000000
21   - Type:            SHT_REL
22     Name:            .rel.text
23     Link:            .symtab
24     Info:            .text
25     AddressAlign:    0x04
26     Relocations:
27       - Offset:          0
28         Symbol:          main
29         Type:            R_386_32
30
31 Symbols:
32   Local:
33     - Name:            .text
34       Type:            STT_SECTION
35       Section:         .text
36
37   Global:
38     - Name:            main
39       Type:            STT_FUNC
40       Section:         .text
41       Size:            0x08