1 # RUN: split-file %s %t
2 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %t/main.s
3 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t/foodeps.o %t/foodeps.s
4 # RUN: rm -f %t/libfoodeps.a
5 # RUN: llvm-ar rcs %t/libfoodeps.a %t/foodeps.o
6 # RUN: wasm-ld %t.o %p/Inputs/libstub.so %t/libfoodeps.a -o %t.wasm
7 # RUN: obj2yaml %t.wasm | FileCheck %s
11 # The function foo is defined in libstub.so but depends on foodep1 and foodep2
13 # foodep1 and foodep2 a defined libfoodeps.a(foodeps.o) but this function
14 # depeds on baz which is also defined in libstub.so.
16 .functype foo () -> ()
20 .functype _start () -> ()
26 .functype bazdep () -> ()
31 .functype baz () -> ()
35 .functype foodep1 () -> ()
41 .functype foodep2 () -> ()
44 # CHECK: - Type: EXPORT
45 # CHECK-NEXT: Exports:
46 # CHECK-NEXT: - Name: memory
47 # CHECK-NEXT: Kind: MEMORY
48 # CHECK-NEXT: Index: 0
49 # CHECK-NEXT: - Name: _start
50 # CHECK-NEXT: Kind: FUNCTION
51 # CHECK-NEXT: Index: 2
52 # CHECK-NEXT: - Name: bazdep
53 # CHECK-NEXT: Kind: FUNCTION
54 # CHECK-NEXT: Index: 3
55 # CHECK-NEXT: - Name: foodep1
56 # CHECK-NEXT: Kind: FUNCTION
57 # CHECK-NEXT: Index: 4
58 # CHECK-NEXT: - Name: foodep2
59 # CHECK-NEXT: Kind: FUNCTION
60 # CHECK-NEXT: Index: 5