data_section.yaml
2.43 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
72
73
74
75
76
# RUN: yaml2obj %s | obj2yaml | FileCheck %s
--- !WASM
FileHeader:
Version: 0x00000001
Sections:
- Type: MEMORY
Memories:
- Initial: 0x00000003
- Type: DATA
Segments:
- InitFlags: 0
Offset:
Opcode: I32_CONST
Value: 4
Content: '10001000'
- InitFlags: 1
Content: '01010101'
- InitFlags: 2
MemoryIndex: 0
Offset:
Opcode: I32_CONST
Value: 8
Content: '00110011'
Relocations:
- Type: R_WASM_MEMORY_ADDR_I32
Index: 0
Offset: 0x00000006
Addend: 8
- Type: R_WASM_MEMORY_ADDR_I32
Index: 0
Offset: 0x00000006
Addend: -6
- Type: CUSTOM
Name: linking
Version: 2
SymbolTable:
- Index: 0
Kind: DATA
Name: dataSymbol
Flags: [ ]
Segment: 0
Offset: 0
Size: 4
...
# CHECK: --- !WASM
# CHECK: FileHeader:
# CHECK: Version: 0x00000001
# CHECK: Sections:
# CHECK: - Type: DATA
# CHECK-NEXT: Relocations:
# CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_I32
# CHECK-NEXT: Index: 0
# CHECK-NEXT: Offset: 0x00000006
# CHECK-NEXT: Addend: 8
# CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_I32
# CHECK-NEXT: Index: 0
# CHECK-NEXT: Offset: 0x00000006
# CHECK-NEXT: Addend: -6
# CHECK-NEXT: Segments:
# CHECK-NEXT: - SectionOffset: 6
# CHECK-NEXT: InitFlags: 0
# CHECK-NEXT: Offset:
# CHECK-NEXT: Opcode: I32_CONST
# CHECK-NEXT: Value: 4
# CHECK-NEXT: Content: '10001000'
# CHECK-NEXT: - SectionOffset: 12
# CHECK-NEXT: InitFlags: 1
# CHECK-NEXT: Content: '01010101'
# CHECK-NEXT: - SectionOffset: 22
# CHECK-NEXT: InitFlags: 2
# CHECK-NEXT: MemoryIndex: 0
# CHECK-NEXT: Offset:
# CHECK-NEXT: Opcode: I32_CONST
# CHECK-NEXT: Value: 8
# CHECK-NEXT: Content: '00110011'
# CHECK-NEXT: - Type: CUSTOM