75 lines
2 KiB
YAML
75 lines
2 KiB
YAML
# RUN: yaml2obj %s -o %t.wasm
|
|
# RUN: llvm-objdump -t %t.wasm | FileCheck %s
|
|
#
|
|
# CHECK: SYMBOL TABLE:
|
|
# CHECK-NEXT: 0000009f g F CODE my_func_export
|
|
# CHECK-NEXT: 0000002a g O DATA my_global_export
|
|
# CHECK-NEXT: 00000000 g TABLE my_table_export
|
|
|
|
--- !WASM
|
|
FileHeader:
|
|
Version: 0x1
|
|
Sections:
|
|
- Type: TYPE
|
|
Signatures:
|
|
- Index: 0
|
|
ParamTypes: []
|
|
ReturnTypes: []
|
|
- Type: IMPORT
|
|
Imports:
|
|
- Module: env
|
|
Field: foo
|
|
Kind: FUNCTION
|
|
SigIndex: 0
|
|
- Module: env
|
|
Field: bar
|
|
Kind: GLOBAL
|
|
GlobalType: I32
|
|
GlobalMutable: true
|
|
- Module: env
|
|
Field: memory
|
|
Kind: MEMORY
|
|
Memory:
|
|
Minimum: 0x1
|
|
- Type: FUNCTION
|
|
FunctionTypes: [ 0 ]
|
|
- Type: TABLE
|
|
Tables:
|
|
- Index: 0
|
|
ElemType: FUNCREF
|
|
Limits:
|
|
Flags: [ HAS_MAX ]
|
|
Minimum: 0x1
|
|
Maximum: 0x1
|
|
- Type: GLOBAL
|
|
Globals:
|
|
- Index: 1
|
|
Mutable: false
|
|
Type: I32
|
|
InitExpr:
|
|
Opcode: I32_CONST
|
|
Value: 42
|
|
- Type: EXPORT
|
|
Exports:
|
|
- Name: my_func_export
|
|
Kind: FUNCTION
|
|
Index: 1
|
|
- Name: my_global_export
|
|
Kind: GLOBAL
|
|
Index: 1
|
|
- Name: my_table_export
|
|
Kind: TABLE
|
|
Index: 0
|
|
- Type: CODE
|
|
Functions:
|
|
- Index: 1
|
|
Locals:
|
|
Body: 00
|
|
- Type: DATA
|
|
Segments:
|
|
- SectionOffset: 0
|
|
InitFlags: 0
|
|
Offset:
|
|
Opcode: I32_CONST
|
|
Value: 0
|
|
Content: ''
|