1 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
2 # RUN: llvm-as %S/Inputs/foo.ll -o %t1.o
3 # RUN: wasm-ld %t.o %t1.o %p/Inputs/stub.so -o %t.wasm
4 # RUN: obj2yaml %t.wasm | FileCheck %s
6 # The function `bar` is declared in stub.so and depends on `foo`, which happens
8 # This verifies that stub library dependencies (required exports) can be defined
10 .functype bar () -> ()
14 .functype _start () -> ()
19 # CHECK-NEXT: - Module: env
20 # CHECK-NEXT: Field: bar
21 # CHECK-NEXT: Kind: FUNCTION
22 # CHECK-NEXT: SigIndex: 0
25 # CHECK-NEXT: - Name: memory
26 # CHECK-NEXT: Kind: MEMORY
27 # CHECK-NEXT: Index: 0
28 # CHECK-NEXT: - Name: _start
29 # CHECK-NEXT: Kind: FUNCTION
30 # CHECK-NEXT: Index: 1
31 # CHECK-NEXT: - Name: foo
32 # CHECK-NEXT: Kind: FUNCTION
33 # CHECK-NEXT: Index: 2