2017-06-20 12:04:59 +08:00
|
|
|
# RUN: yaml2obj %s | obj2yaml | FileCheck %s
|
|
|
|
--- !WASM
|
|
|
|
FileHeader:
|
|
|
|
Version: 0x00000001
|
|
|
|
Sections:
|
2017-06-28 04:27:59 +08:00
|
|
|
- Type: TYPE
|
|
|
|
Signatures:
|
2018-01-10 05:38:53 +08:00
|
|
|
- Index: 0
|
|
|
|
ReturnType: I32
|
2017-06-28 04:27:59 +08:00
|
|
|
ParamTypes:
|
|
|
|
- Type: FUNCTION
|
|
|
|
FunctionTypes: [ 0, 0 ]
|
|
|
|
- Type: GLOBAL
|
|
|
|
Globals:
|
2018-01-10 05:38:53 +08:00
|
|
|
- Index: 0
|
|
|
|
Type: I32
|
2017-06-28 04:27:59 +08:00
|
|
|
Mutable: false
|
|
|
|
InitExpr:
|
|
|
|
Opcode: I32_CONST
|
|
|
|
Value: 1
|
2017-06-20 12:04:59 +08:00
|
|
|
- Type: EXPORT
|
|
|
|
Exports:
|
|
|
|
- Name: function_export
|
|
|
|
Kind: FUNCTION
|
|
|
|
Index: 1
|
|
|
|
- Name: global_export
|
|
|
|
Kind: GLOBAL
|
2017-06-28 04:27:59 +08:00
|
|
|
Index: 0
|
2018-01-18 03:28:43 +08:00
|
|
|
- Type: CODE
|
|
|
|
Functions:
|
|
|
|
- Index: 0
|
|
|
|
Locals:
|
|
|
|
Body: 00
|
|
|
|
- Index: 1
|
|
|
|
Locals:
|
|
|
|
Body: 00
|
2017-06-20 12:04:59 +08:00
|
|
|
- Type: CUSTOM
|
|
|
|
Name: linking
|
2019-01-16 09:34:48 +08:00
|
|
|
Version: 2
|
2018-02-23 13:08:34 +08:00
|
|
|
SymbolTable:
|
|
|
|
- Index: 0
|
|
|
|
Kind: FUNCTION
|
|
|
|
Name: function_export
|
2017-12-14 06:02:25 +08:00
|
|
|
Flags: [ BINDING_WEAK ]
|
2018-02-23 13:08:34 +08:00
|
|
|
Function: 0
|
|
|
|
- Index: 1
|
|
|
|
Kind: GLOBAL
|
|
|
|
Name: global_export
|
2017-12-14 06:02:25 +08:00
|
|
|
Flags: [ BINDING_WEAK ]
|
2018-02-23 13:08:34 +08:00
|
|
|
Global: 0
|
2017-06-20 12:04:59 +08:00
|
|
|
...
|
|
|
|
# CHECK: --- !WASM
|
|
|
|
# CHECK: FileHeader:
|
|
|
|
# CHECK: Version: 0x00000001
|
|
|
|
# CHECK: Sections:
|
|
|
|
# CHECK: - Type: EXPORT
|
|
|
|
# CHECK: Exports:
|
|
|
|
# CHECK: - Name: function_export
|
|
|
|
# CHECK: Kind: FUNCTION
|
|
|
|
# CHECK: Index: 1
|
|
|
|
# CHECK: - Name: global_export
|
|
|
|
# CHECK: Kind: GLOBAL
|
2017-06-28 04:27:59 +08:00
|
|
|
# CHECK: Index: 0
|
2017-06-20 12:04:59 +08:00
|
|
|
# CHECK: - Type: CUSTOM
|
|
|
|
# CHECK: Name: linking
|
2018-02-23 13:08:34 +08:00
|
|
|
# CHECK: SymbolTable:
|
|
|
|
# CHECK: - Index: 0
|
|
|
|
# CHECK: Kind: FUNCTION
|
|
|
|
# CHECK: Name: function_export
|
|
|
|
# CHECK: Flags: [ BINDING_WEAK ]
|
|
|
|
# CHECK: Function: 0
|
|
|
|
# CHECK: - Index: 1
|
|
|
|
# CHECK: Kind: GLOBAL
|
|
|
|
# CHECK: Name: global_export
|
|
|
|
# CHECK: Flags: [ BINDING_WEAK ]
|
|
|
|
# CHECK: Global: 0
|