80 lines · yaml
1# RUN: yaml2obj %s -o %t.wasm2# RUN: llvm-nm %t.wasm | FileCheck %s3# RUN: llvm-nm -P %t.wasm | FileCheck %s --check-prefix=POSIX4 5# CHECK: 0000009f T my_func_export6# CHECK-NEXT: 0000002a D my_global_export7# CHECK-NEXT: 00000000 D my_table_export8 9# POSIX: my_func_export T 9f 310# POSIX-NEXT: my_global_export D 2a 011# POSIX-NEXT: my_table_export D 0 012 13--- !WASM14FileHeader:15 Version: 0x116Sections:17 - Type: TYPE18 Signatures:19 - Index: 020 ParamTypes: []21 ReturnTypes: []22 - Type: IMPORT23 Imports:24 - Module: env25 Field: foo26 Kind: FUNCTION27 SigIndex: 028 - Module: env29 Field: bar30 Kind: GLOBAL31 GlobalType: I3232 GlobalMutable: true33 - Module: env34 Field: memory35 Kind: MEMORY36 Memory:37 Minimum: 0x138 - Type: FUNCTION39 FunctionTypes: [ 0 ]40 - Type: TABLE41 Tables:42 - Index: 043 ElemType: FUNCREF44 Limits:45 Flags: [ HAS_MAX ]46 Minimum: 0x147 Maximum: 0x148 - Type: GLOBAL49 Globals:50 - Index: 151 Mutable: false52 Type: I3253 InitExpr:54 Opcode: I32_CONST55 Value: 4256 - Type: EXPORT57 Exports:58 - Name: my_func_export59 Kind: FUNCTION60 Index: 161 - Name: my_global_export62 Kind: GLOBAL63 Index: 164 - Name: my_table_export65 Kind: TABLE66 Index: 067 - Type: CODE68 Functions:69 - Index: 170 Locals:71 Body: 0072 - Type: DATA73 Segments:74 - SectionOffset: 075 InitFlags: 076 Offset:77 Opcode: I32_CONST78 Value: 079 Content: ''80