1# RUN: yaml2obj %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_LANAI_32 main 0x0
7# CHECK-NEXT:     0x4 R_LANAI_NONE - 0x0
8# CHECK-NEXT:     0x8 R_LANAI_21 - 0x0
9# CHECK-NEXT:     0xC R_LANAI_21_F - 0x0
10# CHECK-NEXT:     0x10 R_LANAI_25 - 0x0
11# CHECK-NEXT:     0x14 R_LANAI_HI16 - 0x0
12# CHECK-NEXT:     0x18 R_LANAI_LO16 - 0x0
13# CHECK-NEXT:   }
14# CHECK-NEXT: ]
15
16!ELF
17FileHeader:
18  Class:           ELFCLASS32
19  Data:            ELFDATA2LSB
20  Type:            ET_REL
21  Machine:         EM_LANAI
22Sections:
23  - Type:            SHT_PROGBITS
24    Name:            .text
25    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
26    AddressAlign:    0x04
27    Content:         0000000000000000
28  - Type:            SHT_REL
29    Name:            .rel.text
30    Link:            .symtab
31    Info:            .text
32    AddressAlign:    0x04
33    Relocations:
34      - Offset:          0x0
35        Symbol:          main
36        Type:            R_LANAI_32
37      - Offset:          0x4
38        Symbol:          a
39        Type:            R_LANAI_NONE
40      - Offset:          0x8
41        Symbol:          b
42        Type:            R_LANAI_21
43      - Offset:          0xC
44        Symbol:          c
45        Type:            R_LANAI_21_F
46      - Offset:          0x10
47        Symbol:          d
48        Type:            R_LANAI_25
49      - Offset:          0x14
50        Symbol:          e
51        Type:            R_LANAI_HI16
52      - Offset:          0x18
53        Symbol:          f
54        Type:            R_LANAI_LO16
55
56
57Symbols:
58  Local:
59    - Name:            .text
60      Type:            STT_SECTION
61      Section:         .text
62
63  Global:
64    - Name:            main
65      Type:            STT_FUNC
66      Section:         .text
67      Size:            0x08
68