linking_section.yaml
2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# RUN: yaml2obj %s | obj2yaml | FileCheck %s
--- !WASM
FileHeader:
Version: 0x00000001
Sections:
- Type: TYPE
Signatures:
- Index: 0
ParamTypes:
- I32
ReturnTypes:
- I32
- Type: IMPORT
Imports:
- Module: foo
Field: bar
Kind: FUNCTION
SigIndex: 0
- Type: DATA
Segments:
- InitFlags: 0
Offset:
Opcode: I32_CONST
Value: 4
Content: '10001000'
- InitFlags: 0
Offset:
Opcode: I32_CONST
Value: 8
Content: '11110000'
- Type: CUSTOM
Name: linking
Version: 2
SymbolTable:
- Index: 0
Kind: FUNCTION
Name: bar
Flags: [ BINDING_WEAK, UNDEFINED ]
Function: 0
SegmentInfo:
- Index: 0
Alignment: 4
Flags: [ ]
Name: mydata
- Index: 1
Alignment: 2
Flags: [ ]
Name: moredata
InitFunctions:
- Priority: 1
Symbol: 0
...
# CHECK: SymbolTable:
# CHECK-NEXT: - Index: 0
# CHECK-NEXT: Kind: FUNCTION
# CHECK-NEXT: Name: bar
# CHECK-NEXT: Flags: [ BINDING_WEAK, UNDEFINED ]
# CHECK-NEXT: Function: 0
# CHECK-NEXT: SegmentInfo:
# CHECK-NEXT: - Index: 0
# CHECK-NEXT: Name: mydata
# CHECK-NEXT: Alignment: 4
# CHECK-NEXT: Flags: [ ]
# CHECK-NEXT: - Index: 1
# CHECK-NEXT: Name: moredata
# CHECK-NEXT: Alignment: 2
# CHECK-NEXT: Flags: [ ]
# CHECK-NEXT: InitFunctions:
# CHECK-NEXT: - Priority: 1
# CHECK-NEXT: Symbol: 0
# CHECK-NEXT: ...