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