• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: yaml2obj %s | obj2yaml | FileCheck %s
2--- !WASM
3FileHeader:
4  Version:         0x00000001
5Sections:
6  - Type:            TYPE
7    Signatures:
8      - Index:           0
9        ReturnType:      I32
10        ParamTypes:
11  - Type:            FUNCTION
12    FunctionTypes:   [ 0, 0 ]
13  - Type:            GLOBAL
14    Globals:         
15      - Index:       0
16        Type:        I32
17        Mutable:     false
18        InitExpr:
19          Opcode:          I32_CONST
20          Value:           1
21  - Type:            EXPORT
22    Exports:         
23      - Name:            function_export
24        Kind:            FUNCTION
25        Index:           1
26      - Name:            global_export
27        Kind:            GLOBAL
28        Index:           0
29  - Type:            CODE
30    Functions:
31      - Index:           0
32        Locals:
33        Body:            00
34      - Index:           1
35        Locals:
36        Body:            00
37  - Type:            CUSTOM
38    Name:            linking
39    Version:         1
40    SymbolTable:
41      - Index:           0
42        Kind:            FUNCTION
43        Name:            function_export
44        Flags:           [ BINDING_WEAK ]
45        Function:        0
46      - Index:           1
47        Kind:            GLOBAL
48        Name:            global_export
49        Flags:           [ BINDING_WEAK ]
50        Global:          0
51...
52# CHECK: --- !WASM
53# CHECK: FileHeader:
54# CHECK:   Version:           0x00000001
55# CHECK: Sections:
56# CHECK:   - Type:            EXPORT
57# CHECK:     Exports:
58# CHECK:       - Name:            function_export
59# CHECK:         Kind:            FUNCTION
60# CHECK:         Index:           1
61# CHECK:       - Name:            global_export
62# CHECK:         Kind:            GLOBAL
63# CHECK:         Index:           0
64# CHECK:   - Type:            CUSTOM
65# CHECK:     Name:            linking
66# CHECK:     SymbolTable:
67# CHECK:      - Index:           0
68# CHECK:        Kind:            FUNCTION
69# CHECK:        Name:            function_export
70# CHECK:        Flags:           [ BINDING_WEAK ]
71# CHECK:        Function:        0
72# CHECK:      - Index:           1
73# CHECK:        Kind:            GLOBAL
74# CHECK:        Name:            global_export
75# CHECK:        Flags:           [ BINDING_WEAK ]
76# CHECK:        Global:          0
77