forked from OSchip/llvm-project
61 lines
1.6 KiB
YAML
61 lines
1.6 KiB
YAML
|
# RUN: yaml2obj %s | obj2yaml | FileCheck %s
|
||
|
--- !WASM
|
||
|
FileHeader:
|
||
|
Version: 0x00000001
|
||
|
Sections:
|
||
|
- Type: TYPE
|
||
|
Signatures:
|
||
|
- ReturnType: I32
|
||
|
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
|
||
|
DataSize: 999
|
||
|
SymbolInfo:
|
||
|
- Name: bar
|
||
|
Flags: 1
|
||
|
SegmentInfo:
|
||
|
- Index: 0
|
||
|
Alignment: 4
|
||
|
Flags: 0
|
||
|
Name: mydata
|
||
|
- Index: 1
|
||
|
Alignment: 2
|
||
|
Flags: 1
|
||
|
Name: moredata
|
||
|
...
|
||
|
# CHECK: - Type: CUSTOM
|
||
|
# CHECK-NEXT: Name: linking
|
||
|
# CHECK-NEXT: DataSize: 999
|
||
|
# CHECK-NEXT: SymbolInfo:
|
||
|
# CHECK-NEXT: - Name: bar
|
||
|
# CHECK-NEXT: Flags: 1
|
||
|
# CHECK-NEXT: SegmentInfo:
|
||
|
# CHECK-NEXT: - Index: 0
|
||
|
# CHECK-NEXT: Name: mydata
|
||
|
# CHECK-NEXT: Alignment: 4
|
||
|
# CHECK-NEXT: Flags: 0
|
||
|
# CHECK-NEXT: - Index: 1
|
||
|
# CHECK-NEXT: Name: moredata
|
||
|
# CHECK-NEXT: Alignment: 2
|
||
|
# CHECK-NEXT: Flags: 1
|
||
|
# CHECK-NEXT: ...
|