1 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
2 # RUN: wasm-ld %t.o -o %t.wasm
3 # RUN: obj2yaml %t.wasm | FileCheck %s
5 .functype __wasm_call_ctors () -> ()
9 .functype myctor () -> (i32)
16 .functype _start () -> ()
17 call __wasm_call_ctors
20 .section .init_array.100,"",@
26 .type __wasm_call_ctors,@function
29 # CHECK-NEXT: Functions:
30 # CHECK-NEXT: - Index: 0
31 # CHECK-NEXT: Locals: []
32 # CHECK-NEXT: Body: 10011A10011A10011A0B
33 # CHECK-NEXT: - Index: 1
34 # CHECK-NEXT: Locals: []
35 # CHECK-NEXT: Body: 41010B
36 # CHECK-NEXT: - Index: 2
37 # CHECK-NEXT: Locals: []
38 # CHECK-NEXT: Body: 1080808080000B
39 # CHECK-NEXT: - Type: CUSTOM
40 # CHECK-NEXT: Name: name
41 # CHECK-NEXT: FunctionNames:
42 # CHECK-NEXT: - Index: 0
43 # CHECK-NEXT: Name: __wasm_call_ctors
44 # CHECK-NEXT: - Index: 1
45 # CHECK-NEXT: Name: myctor
46 # CHECK-NEXT: - Index: 2
47 # CHECK-NEXT: Name: _start
48 # CHECK-NEXT: GlobalNames:
49 # CHECK-NEXT: - Index: 0
50 # CHECK-NEXT: Name: __stack_pointer