Debian Codegraph @

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

raw
1 # RUN: yaml2obj %s -o %t.so
2 # RUN: llvm-nm %t.so | FileCheck %s
3 #
4 # CHECK: 00000001 T my_func_export
5 # CHECK: 0000002a D my_global_export
6
7 --- !WASM
8 FileHeader:
9 Version: 0x1
10 Sections:
11 - Type: CUSTOM
12 Name: dylink.0
13 MemorySize: 15
14 MemoryAlignment: 0
15 TableSize: 0
16 TableAlignment: 0
17 Needed: []
18 - Type: TYPE
19 Signatures:
20 - Index: 0
21 ParamTypes: []
22 ReturnTypes: []
23 - Type: IMPORT
24 Imports:
25 - Module: env
26 Field: foo
27 Kind: FUNCTION
28 SigIndex: 0
29 - Module: env
30 Field: bar
31 Kind: GLOBAL
32 GlobalType: I32
33 GlobalMutable: true
34 - Module: env
35 Field: memory
36 Kind: MEMORY
37 Memory:
38 Minimum: 0x1
39 - Type: FUNCTION
40 FunctionTypes: [ 0 ]
41 - Type: GLOBAL
42 Globals:
43 - Index: 1
44 Mutable: false
45 Type: I32
46 InitExpr:
47 Opcode: I32_CONST
48 Value: 42
49 - Type: EXPORT
50 Exports:
51 - Name: my_func_export
52 Kind: FUNCTION
53 Index: 1
54 - Name: my_global_export
55 Kind: GLOBAL
56 Index: 1
57 - Type: CODE
58 Functions:
59 - Index: 1
60 Locals:
61 Body: 00
62 - Type: DATA
63 Segments:
64 - SectionOffset: 0
65 InitFlags: 0
66 Offset:
67 Opcode: I32_CONST
68 Value: 0
69 Content: ''