1 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
2 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/ret32.s -o %t.ret32.o
4 # RUN: wasm-ld -shared --experimental-pic -o %t.ret32.so %t.ret32.o
5 # RUN: obj2yaml %t.ret32.so | FileCheck %s -check-prefix=SO1
7 # Without linking against the ret32.so shared object we expect an undefined
10 # RUN: not wasm-ld -shared --experimental-pic -o %t.so %t.o 2>&1 | FileCheck %s --check-prefix=ERROR
11 # ERROR: undefined symbol: ret32
13 # RUN: wasm-ld -shared --experimental-pic -o %t.so %t.o %t.ret32.so
14 # RUN: obj2yaml %t.so | FileCheck %s -check-prefix=SO2
20 .functype ret32 (f32) -> (i32)
23 .functype foo (f32) -> (i32)
36 # SO1-NEXT: - Type: CUSTOM
37 # SO1-NEXT: Name: dylink.0
38 # SO1-NEXT: MemorySize: 0
39 # SO1-NEXT: MemoryAlignment: 0
40 # SO1-NEXT: TableSize: 0
41 # SO1-NEXT: TableAlignment: 0
42 # SO1-NEXT: Needed: []
43 # SO1-NEXT: - Type: TYPE
46 # SO2-NEXT: - Type: CUSTOM
47 # SO2-NEXT: Name: dylink.0
48 # SO2-NEXT: MemorySize: 4
49 # SO2-NEXT: MemoryAlignment: 2
50 # SO2-NEXT: TableSize: 0
51 # SO2-NEXT: TableAlignment: 0
53 # SO2-NEXT: - shared-needed.s.tmp.ret32.so
54 # SO2-NEXT: - Type: TYPE