2017-03-31 03:44:09 +08:00
|
|
|
# RUN: yaml2obj %s | obj2yaml | FileCheck %s
|
|
|
|
--- !WASM
|
|
|
|
FileHeader:
|
|
|
|
Version: 0x00000001
|
|
|
|
Sections:
|
|
|
|
- Type: MEMORY
|
|
|
|
Memories:
|
|
|
|
- Initial: 0x00000003
|
|
|
|
- Type: DATA
|
|
|
|
Segments:
|
2017-07-12 08:24:54 +08:00
|
|
|
- MemoryIndex: 0
|
2017-03-31 03:44:09 +08:00
|
|
|
Offset:
|
|
|
|
Opcode: I32_CONST
|
|
|
|
Value: 4
|
|
|
|
Content: '10001000'
|
2017-04-26 08:02:31 +08:00
|
|
|
Relocations:
|
2017-09-02 01:32:01 +08:00
|
|
|
- Type: R_WEBASSEMBLY_MEMORY_ADDR_I32
|
2017-04-26 08:02:31 +08:00
|
|
|
Index: 0
|
|
|
|
Offset: 0x00000006
|
|
|
|
Addend: 8
|
2017-09-02 01:32:01 +08:00
|
|
|
- Type: R_WEBASSEMBLY_MEMORY_ADDR_I32
|
2017-04-26 08:02:31 +08:00
|
|
|
Index: 0
|
|
|
|
Offset: 0x00000006
|
|
|
|
Addend: -6
|
2018-03-05 21:32:38 +08:00
|
|
|
- Type: CUSTOM
|
|
|
|
Name: linking
|
2018-04-27 02:15:32 +08:00
|
|
|
Version: 1
|
2018-03-05 21:32:38 +08:00
|
|
|
SymbolTable:
|
|
|
|
- Index: 0
|
|
|
|
Kind: DATA
|
|
|
|
Name: dataSymbol
|
|
|
|
Flags: [ ]
|
|
|
|
Segment: 0
|
|
|
|
Offset: 0
|
|
|
|
Size: 4
|
2017-03-31 03:44:09 +08:00
|
|
|
...
|
|
|
|
# CHECK: --- !WASM
|
|
|
|
# CHECK: FileHeader:
|
|
|
|
# CHECK: Version: 0x00000001
|
|
|
|
# CHECK: Sections:
|
|
|
|
# CHECK: - Type: DATA
|
2017-04-26 08:02:31 +08:00
|
|
|
# CHECK-NEXT: Relocations:
|
2017-09-02 01:32:01 +08:00
|
|
|
# CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_I32
|
2017-04-26 08:02:31 +08:00
|
|
|
# CHECK-NEXT: Index: 0
|
|
|
|
# CHECK-NEXT: Offset: 0x00000006
|
|
|
|
# CHECK-NEXT: Addend: 8
|
2017-09-02 01:32:01 +08:00
|
|
|
# CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_I32
|
2017-04-26 08:02:31 +08:00
|
|
|
# CHECK-NEXT: Index: 0
|
|
|
|
# CHECK-NEXT: Offset: 0x00000006
|
|
|
|
# CHECK-NEXT: Addend: -6
|
|
|
|
# CHECK-NEXT: Segments:
|
2017-07-12 08:24:54 +08:00
|
|
|
# CHECK-NEXT: - SectionOffset: 6
|
|
|
|
# CHECK-NEXT: MemoryIndex: 0
|
2017-04-26 08:02:31 +08:00
|
|
|
# CHECK-NEXT: Offset:
|
|
|
|
# CHECK-NEXT: Opcode: I32_CONST
|
|
|
|
# CHECK-NEXT: Value: 4
|
|
|
|
# CHECK-NEXT: Content: '10001000'
|
2018-03-05 21:32:38 +08:00
|
|
|
# CHECK-NEXT: - Type: CUSTOM
|