1 # RUN: llvm-mc -triple=wasm32-unknown-unknown -filetype=obj < %s | obj2yaml | FileCheck %s
4 .functype init1 () -> ()
8 .functype init2 () -> ()
11 .section .init_array.42,"",@
15 .section .init_array,"",@
22 .section .init_array,"",@
30 # CHECK: - Type: FUNCTION
31 # CHECK-NEXT: FunctionTypes: [ 0, 0 ]
32 # CHECK-NEXT: - Type: DATACOUNT
33 # CHECK-NEXT: Count: 1
34 # CHECK-NEXT: - Type: CODE
35 # CHECK-NEXT: Functions:
36 # CHECK-NEXT: - Index: 0
37 # CHECK-NEXT: Locals: []
38 # CHECK-NEXT: Body: 0B
39 # CHECK-NEXT: - Index: 1
40 # CHECK-NEXT: Locals: []
41 # CHECK-NEXT: Body: 0B
42 # CHECK-NEXT: - Type: DATA
43 # CHECK-NEXT: Segments:
44 # CHECK-NEXT: - SectionOffset: 6
45 # CHECK-NEXT: InitFlags: 0
47 # CHECK-NEXT: Opcode: I32_CONST
48 # CHECK-NEXT: Value: 0
49 # CHECK-NEXT: Content: '000000000000000000000000'
50 # CHECK-NEXT: - Type: CUSTOM
51 # CHECK-NEXT: Name: linking
52 # CHECK-NEXT: Version: 2
53 # CHECK-NEXT: SymbolTable:
54 # CHECK-NEXT: - Index: 0
55 # CHECK-NEXT: Kind: FUNCTION
56 # CHECK-NEXT: Name: init1
57 # CHECK-NEXT: Flags: [ BINDING_LOCAL ]
58 # CHECK-NEXT: Function: 0
59 # CHECK-NEXT: - Index: 1
60 # CHECK-NEXT: Kind: FUNCTION
61 # CHECK-NEXT: Name: init2
62 # CHECK-NEXT: Flags: [ BINDING_LOCAL ]
63 # CHECK-NEXT: Function: 1
64 # CHECK-NEXT: - Index: 2
65 # CHECK-NEXT: Kind: DATA
66 # CHECK-NEXT: Name: p_init1
67 # CHECK-NEXT: Flags: [ ]
68 # CHECK-NEXT: Segment: 0
70 # CHECK-NEXT: - Index: 3
71 # CHECK-NEXT: Kind: DATA
72 # CHECK-NEXT: Name: p_init2
73 # CHECK-NEXT: Flags: [ ]
74 # CHECK-NEXT: Segment: 0
75 # CHECK-NEXT: Offset: 4
77 # CHECK-NEXT: SegmentInfo:
78 # CHECK-NEXT: - Index: 0
79 # CHECK-NEXT: Name: .init_array
80 # CHECK-NEXT: Alignment: 2
81 # CHECK-NEXT: Flags: [ ]
82 # CHECK-NEXT: InitFunctions:
83 # CHECK-NEXT: - Priority: 42
84 # CHECK-NEXT: Symbol: 0
85 # CHECK-NEXT: - Priority: 65535
86 # CHECK-NEXT: Symbol: 0
87 # CHECK-NEXT: - Priority: 65535
88 # CHECK-NEXT: Symbol: 0
89 # CHECK-NEXT: - Priority: 65535
90 # CHECK-NEXT: Symbol: 1