[LLD][COFF] Ignore DEBUG_S_XFGHASH_TYPE/VIRTUAL
[llvm-project.git] / lld / test / wasm / shared-memory.yaml
blobf10ac6ad53194d817755d558aef44bd35d20caad
1 # RUN: yaml2obj %s -o %t1.o
3 # RUN: wasm-ld --no-entry --shared-memory --features=atomics,bulk-memory %t1.o -o - | obj2yaml | FileCheck %s --check-prefix SHARED
5 # RUN: not wasm-ld --no-entry --shared-memory --max-memory=100000 %t1.o -o - 2>&1 | FileCheck %s --check-prefix SHARED-UNALIGNED
7 # RUN: not wasm-ld --no-entry --shared-memory --max-memory=131072 --features=bulk-memory %t1.o -o - 2>&1 | FileCheck %s --check-prefix SHARED-NO-ATOMICS
9 # RUN: not wasm-ld --no-entry --shared-memory --max-memory=131072 --features=atomics %t1.o -o - 2>&1 | FileCheck %s --check-prefix SHARED-NO-BULK-MEM
11 # RUN: wasm-ld --relocatable --features=atomics %t1.o -o - | obj2yaml | FileCheck %s --check-prefix ATOMICS-RELOCATABLE
13 # RUN: wasm-ld --no-entry --shared-memory --max-memory=131072 --features=atomics,bulk-memory %t1.o -o - | obj2yaml | FileCheck %s --check-prefix SHARED
15 --- !WASM
16 FileHeader:
17   Version:         0x00000001
18 Sections:
19   - Type:            IMPORT
20     Imports:
21       - Module:          env
22         Field:           __linear_memory
23         Kind:            MEMORY
24         Memory:
25           Minimum:         0x00000001
26       - Module:          env
27         Field:           __indirect_function_table
28         Kind:            TABLE
29         Table:
30           Index:           0
31           ElemType:        FUNCREF
32           Limits:
33             Minimum:         0x00000000
34   - Type:            DATA
35     Segments:
36       - SectionOffset:   6
37         InitFlags:       0
38         Offset:
39           Opcode:          I32_CONST
40           Value:           0
41         Content:         68656C6C6F0A00
42   - Type:            CUSTOM
43     Name:            linking
44     Version:         2
45     SymbolTable:
46       - Index:           0
47         Kind:            DATA
48         Name:            hello_str
49         Flags:           [  ]
50         Segment:         0
51         Size:            7
52     SegmentInfo:
53       - Index:           0
54         Name:            .rodata.hello_str
55         Alignment:       0
56         Flags:           [  ]
57 ...
59 # SHARED-UNALIGNED: maximum memory must be 65536-byte aligned{{$}}
61 # SHARED-NO-ATOMICS: 'atomics' feature must be used in order to use shared memory
63 # SHARED-NO-BULK-MEM: 'bulk-memory' feature must be used in order to use shared memory
65 # ATOMICS-RELOCATABLE:        - Type:            MEMORY
66 # ATOMICS-RELOCATABLE-NEXT:     Memories:
67 # ATOMICS-RELOCATABLE-NEXT:         Minimum:         0x1
68 # ATOMICS-RELOCATABLE-NEXT:   - Type:
70 # SHARED:        - Type:            MEMORY
71 # SHARED-NEXT:     Memories:
72 # SHARED-NEXT:       - Flags:           [ HAS_MAX, IS_SHARED ]
73 # SHARED-NEXT:         Minimum:         0x2
74 # SHARED-NEXT:         Maximum:         0x2