1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00
llvm-mirror/test/ObjectYAML/wasm/data_section.yaml
Georgii Rymar 53a457743b Reland "[lib/Support/YAMLTraits] - Don't print leading zeroes when dumping Hex8/Hex16/Hex32 types." (https://reviews.llvm.org/D90930).
This reverts reverting commit fc40a03323a4b265ccbed34a07e281b13c5e8367
and fixes LLD (MachO/wasm) tests that failed previously.
2020-11-18 13:08:46 +03:00

77 lines
2.4 KiB
YAML

# 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: 0x1
# CHECK: Sections:
# CHECK: - Type: DATA
# CHECK-NEXT: Relocations:
# CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_I32
# CHECK-NEXT: Index: 0
# CHECK-NEXT: Offset: 0x6
# CHECK-NEXT: Addend: 8
# CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_I32
# CHECK-NEXT: Index: 0
# CHECK-NEXT: Offset: 0x6
# 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