[obj2yaml] - Fix a comment. NFC.
[llvm-complete.git] / test / ObjectYAML / wasm / code_section.yaml
blobdad75e081ea794ee1c057a4caa5f500c13e21cb4
1 # RUN: yaml2obj %s | obj2yaml | FileCheck %s
2 --- !WASM
3 FileHeader:
4   Version:         0x00000001
5 Sections:
6   - Type:            TYPE
7     Signatures:
8       - Index:           0
9         ParamTypes:
10           - I32
11         ReturnTypes:
12           - F32
13       - Index:           1
14         ParamTypes:
15           - I32
16           - I64
17         ReturnTypes:     []
18   - Type:            FUNCTION
19     FunctionTypes:
20       - 0
21       - 1
22   - Type:            CODE
23     Relocations:
24       - Type:            R_WASM_TABLE_INDEX_SLEB
25         Index:           0
26         Offset:          0x00000006
27       - Type:            R_WASM_FUNCTION_INDEX_LEB
28         Index:           1
29         Offset:          0x00000025
30     Functions:
31       - Index:              0
32         Locals:
33          - Type:            I32
34            Count:           3
35         Body:            418080808000210020002101200111808080800000210220020F0B
36       - Index:              1
37         Locals:
38          - Type:            I32
39            Count:           1
40         Body:            108180808000210020000F0B
41   - Type:            CUSTOM
42     Name:            linking
43     Version:         2
44     SymbolTable:
45       - Index:           0
46         Kind:            FUNCTION
47         Name:            func1
48         Flags:           [  ]
49         Function:        0
50       - Index:           1
51         Kind:            FUNCTION
52         Name:            func2
53         Flags:           [  ]
54         Function:        1
55 ...
56 # CHECK: --- !WASM
57 # CHECK: FileHeader:
58 # CHECK:   Version:           0x00000001
59 # CHECK: Sections:
60 # CHECK:  - Type:            TYPE
61 # CHECK:    Signatures:
62 # CHECK:      - Index:           0
63 # CHECK:        ParamTypes:
64 # CHECK:          - I32
65 # CHECK:        ReturnTypes:
66 # CHECK:          - F32
67 # CHECK:      - Index:           1
68 # CHECK:        ParamTypes:
69 # CHECK:          - I32
70 # CHECK:          - I64
71 # CHECK:        ReturnTypes:     []
72 # CHECK:  - Type:            CODE
73 # CHECK:    Relocations:
74 # CHECK:      - Type:            R_WASM_TABLE_INDEX_SLEB
75 # CHECK:        Index:           0
76 # CHECK:        Offset:          0x00000006
77 # CHECK:      - Type:            R_WASM_FUNCTION_INDEX_LEB
78 # CHECK:        Index:           1
79 # CHECK:        Offset:          0x00000025
80 # CHECK:    Functions:
81 # CHECK:      - Index:              0
82 # CHECK:        Locals:
83 # CHECK:         - Type:            I32
84 # CHECK:           Count:           3
85 # CHECK:        Body:            418080808000210020002101200111808080800000210220020F0B
86 # CHECK:      - Index:              1
87 # CHECK:        Locals:
88 # CHECK:         - Type:            I32
89 # CHECK:           Count:           1
90 # CHECK:        Body:            108180808000210020000F0B