Debian Codegraph @

llvm/test/tools/llvm-nm/wasm/linked.yaml

raw
1 # RUN: yaml2obj %s -o %t.wasm
2 # RUN: llvm-nm %t.wasm | FileCheck %s
3 # RUN: llvm-nm -P %t.wasm | FileCheck %s --check-prefix=POSIX
4
5 # CHECK: 0000009f T my_func_export
6 # CHECK-NEXT: 0000002a D my_global_export
7 # CHECK-NEXT: 00000000 D my_table_export
8
9 # POSIX: my_func_export T 9f 3
10 # POSIX-NEXT: my_global_export D 2a 0
11 # POSIX-NEXT: my_table_export D 0 0
12
13 --- !WASM
14 FileHeader:
15 Version: 0x1
16 Sections:
17 - Type: TYPE
18 Signatures:
19 - Index: 0
20 ParamTypes: []
21 ReturnTypes: []
22 - Type: IMPORT
23 Imports:
24 - Module: env
25 Field: foo
26 Kind: FUNCTION
27 SigIndex: 0
28 - Module: env
29 Field: bar
30 Kind: GLOBAL
31 GlobalType: I32
32 GlobalMutable: true
33 - Module: env
34 Field: memory
35 Kind: MEMORY
36 Memory:
37 Minimum: 0x1
38 - Type: FUNCTION
39 FunctionTypes: [ 0 ]
40 - Type: TABLE
41 Tables:
42 - Index: 0
43 ElemType: FUNCREF
44 Limits:
45 Flags: [ HAS_MAX ]
46 Minimum: 0x1
47 Maximum: 0x1
48 - Type: GLOBAL
49 Globals:
50 - Index: 1
51 Mutable: false
52 Type: I32
53 InitExpr:
54 Opcode: I32_CONST
55 Value: 42
56 - Type: EXPORT
57 Exports:
58 - Name: my_func_export
59 Kind: FUNCTION
60 Index: 1
61 - Name: my_global_export
62 Kind: GLOBAL
63 Index: 1
64 - Name: my_table_export
65 Kind: TABLE
66 Index: 0
67 - Type: CODE
68 Functions:
69 - Index: 1
70 Locals:
71 Body: 00
72 - Type: DATA
73 Segments:
74 - SectionOffset: 0
75 InitFlags: 0
76 Offset:
77 Opcode: I32_CONST
78 Value: 0
79 Content: ''