[X86][MC,LLD][NFC] Rename R_X86_64_REX2_GOTPCRELX (#116737)
[llvm-project.git] / lld / test / wasm / ctor-return-value.s
blob1943306c88f903871df76b58b2e27827d7bd92da
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 () -> ()
7 .globl myctor
8 myctor:
9 .functype myctor () -> (i32)
10 i32.const 1
12 end_function
14 .globl _start
15 _start:
16 .functype _start () -> ()
17 call __wasm_call_ctors
18 end_function
20 .section .init_array.100,"",@
21 .p2align 2
22 .int32 myctor
23 .int32 myctor
24 .int32 myctor
26 .type __wasm_call_ctors,@function
28 # CHECK: - Type: CODE
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
51 # CHECK-NEXT: ...