2017-12-14 05:53:40 +08:00
|
|
|
# RUN: yaml2obj %s | obj2yaml | FileCheck %s
|
|
|
|
--- !WASM
|
|
|
|
FileHeader:
|
|
|
|
Version: 0x00000001
|
|
|
|
Sections:
|
|
|
|
- Type: TYPE
|
|
|
|
Signatures:
|
2018-01-10 05:38:53 +08:00
|
|
|
- Index: 0
|
|
|
|
ReturnType: I32
|
2017-12-14 05:53:40 +08:00
|
|
|
ParamTypes:
|
|
|
|
- I32
|
|
|
|
- Type: IMPORT
|
|
|
|
Imports:
|
|
|
|
- Module: foo
|
|
|
|
Field: bar
|
|
|
|
Kind: FUNCTION
|
|
|
|
SigIndex: 0
|
|
|
|
- Type: DATA
|
|
|
|
Segments:
|
|
|
|
- MemoryIndex: 0
|
|
|
|
Offset:
|
|
|
|
Opcode: I32_CONST
|
|
|
|
Value: 4
|
|
|
|
Content: '10001000'
|
|
|
|
- MemoryIndex: 0
|
|
|
|
Offset:
|
|
|
|
Opcode: I32_CONST
|
|
|
|
Value: 8
|
|
|
|
Content: '11110000'
|
|
|
|
- Type: CUSTOM
|
|
|
|
Name: linking
|
2018-04-27 02:15:32 +08:00
|
|
|
Version: 1
|
2018-02-23 13:08:34 +08:00
|
|
|
SymbolTable:
|
|
|
|
- Index: 0
|
|
|
|
Kind: FUNCTION
|
|
|
|
Name: bar
|
|
|
|
Flags: [ BINDING_WEAK, UNDEFINED ]
|
|
|
|
Function: 0
|
2017-12-14 05:53:40 +08:00
|
|
|
SegmentInfo:
|
|
|
|
- Index: 0
|
|
|
|
Alignment: 4
|
2017-12-14 06:02:25 +08:00
|
|
|
Flags: [ ]
|
2017-12-14 05:53:40 +08:00
|
|
|
Name: mydata
|
|
|
|
- Index: 1
|
|
|
|
Alignment: 2
|
2017-12-14 06:02:25 +08:00
|
|
|
Flags: [ ]
|
2017-12-14 05:53:40 +08:00
|
|
|
Name: moredata
|
2017-12-15 05:10:03 +08:00
|
|
|
InitFunctions:
|
|
|
|
- Priority: 1
|
2018-02-23 13:08:34 +08:00
|
|
|
Symbol: 0
|
2017-12-14 05:53:40 +08:00
|
|
|
...
|
2018-04-27 02:15:32 +08:00
|
|
|
# CHECK: SymbolTable:
|
2018-02-23 13:08:34 +08:00
|
|
|
# CHECK-NEXT: - Index: 0
|
|
|
|
# CHECK-NEXT: Kind: FUNCTION
|
|
|
|
# CHECK-NEXT: Name: bar
|
|
|
|
# CHECK-NEXT: Flags: [ BINDING_WEAK, UNDEFINED ]
|
|
|
|
# CHECK-NEXT: Function: 0
|
2017-12-14 05:53:40 +08:00
|
|
|
# CHECK-NEXT: SegmentInfo:
|
|
|
|
# CHECK-NEXT: - Index: 0
|
|
|
|
# CHECK-NEXT: Name: mydata
|
|
|
|
# CHECK-NEXT: Alignment: 4
|
2017-12-14 06:02:25 +08:00
|
|
|
# CHECK-NEXT: Flags: [ ]
|
2017-12-14 05:53:40 +08:00
|
|
|
# CHECK-NEXT: - Index: 1
|
|
|
|
# CHECK-NEXT: Name: moredata
|
|
|
|
# CHECK-NEXT: Alignment: 2
|
2017-12-14 06:02:25 +08:00
|
|
|
# CHECK-NEXT: Flags: [ ]
|
2017-12-15 05:10:03 +08:00
|
|
|
# CHECK-NEXT: InitFunctions:
|
|
|
|
# CHECK-NEXT: - Priority: 1
|
2018-02-23 13:08:34 +08:00
|
|
|
# CHECK-NEXT: Symbol: 0
|
2017-12-14 05:53:40 +08:00
|
|
|
# CHECK-NEXT: ...
|