1 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
5 .functype entry () -> ()
8 # RUN: wasm-ld -e entry -o %t1.wasm %t.o
9 # RUN: obj2yaml %t1.wasm | FileCheck %s
10 # RUN: wasm-ld --entry=entry -o %t2.wasm %t.o
11 # RUN: obj2yaml %t2.wasm | FileCheck %s
13 # CHECK: - Type: EXPORT
14 # CHECK-NEXT: Exports:
15 # CHECK-NEXT: - Name: memory
16 # CHECK-NEXT: Kind: MEMORY
17 # CHECK-NEXT: Index: 0
18 # CHECK-NEXT: - Name: entry
19 # CHECK-NEXT: Kind: FUNCTION
20 # CHECK-NEXT: Index: 0
23 # The __wasm_call_ctors is somewhat special since its created by the linker.
24 # Make sure we can use it as the entry point if we choose
25 # RUN: wasm-ld --entry=__wasm_call_ctors -o %t3.wasm %t.o
26 # RUN: obj2yaml %t3.wasm | FileCheck %s -check-prefix=CHECK-CTOR
28 # CHECK-CTOR: - Type: EXPORT
29 # CHECK-CTOR-NEXT: Exports:
30 # CHECK-CTOR-NEXT: - Name: memory
31 # CHECK-CTOR-NEXT: Kind: MEMORY
32 # CHECK-CTOR-NEXT: Index: 0
33 # CHECK-CTOR-NEXT: - Name: __wasm_call_ctors
34 # CHECK-CTOR-NEXT: Kind: FUNCTION
35 # CHECK-CTOR-NEXT: Index: 0
36 # CHECK-CTOR-NEXT: - Type: