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
22 Field: __linear_memory
27 Field: __indirect_function_table
41 Content: 68656C6C6F0A00
54 Name: .rodata.hello_str
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