1 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
2 # RUN: wasm-ld --export=start_alias %t.o -o %t.wasm
3 # RUN: obj2yaml %t.wasm | FileCheck %s
7 .functype _start () -> ()
11 .type start_alias,@function
12 .set start_alias, _start
15 # CHECK-NEXT: FileHeader:
16 # CHECK-NEXT: Version: 0x1
17 # CHECK-NEXT: Sections:
18 # CHECK-NEXT: - Type: TYPE
19 # CHECK-NEXT: Signatures:
20 # CHECK-NEXT: - Index: 0
21 # CHECK-NEXT: ParamTypes:
22 # CHECK-NEXT: ReturnTypes: []
23 # CHECK-NEXT: - Type: FUNCTION
24 # CHECK-NEXT: FunctionTypes: [ 0 ]
25 # CHECK-NEXT: - Type: MEMORY
26 # CHECK-NEXT: Memories:
27 # CHECK-NEXT: - Minimum: 0x2
28 # CHECK-NEXT: - Type: GLOBAL
29 # CHECK-NEXT: Globals:
30 # CHECK-NEXT: - Index: 0
31 # CHECK-NEXT: Type: I32
32 # CHECK-NEXT: Mutable: true
33 # CHECK-NEXT: InitExpr:
34 # CHECK-NEXT: Opcode: I32_CONST
35 # CHECK-NEXT: Value: 66560
36 # CHECK-NEXT: - Type: EXPORT
37 # CHECK-NEXT: Exports:
38 # CHECK-NEXT: - Name: memory
39 # CHECK-NEXT: Kind: MEMORY
40 # CHECK-NEXT: Index: 0
41 # CHECK-NEXT: - Name: _start
42 # CHECK-NEXT: Kind: FUNCTION
43 # CHECK-NEXT: Index: 0
44 # CHECK-NEXT: - Name: start_alias
45 # CHECK-NEXT: Kind: FUNCTION
46 # CHECK-NEXT: Index: 0
47 # CHECK-NEXT: - Type: CODE
48 # CHECK-NEXT: Functions:
49 # CHECK-NEXT: - Index: 0
51 # CHECK-NEXT: Body: 0B
52 # CHECK-NEXT: - Type: CUSTOM
53 # CHECK-NEXT: Name: name
54 # CHECK-NEXT: FunctionNames:
55 # CHECK-NEXT: - Index: 0
56 # CHECK-NEXT: Name: _start
57 # CHECK-NEXT: GlobalNames:
58 # CHECK-NEXT: - Index: 0
59 # CHECK-NEXT: Name: __stack_pointer