1 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %s -o %t.o
2 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/ret32.s -o %t.ret32.o
3 # RUN: wasm-ld --emit-relocs -o %t.wasm %t.o %t.ret32.o
4 # RUN: obj2yaml %t.wasm | FileCheck %s
6 .functype ret32 (f32) -> (i32)
9 .functype unused_function () -> ()
14 .functype _start () -> ()
24 .section .bss.data,"",@
31 # CHECK-NEXT: Relocations:
32 # CHECK-NEXT: - Type: R_WASM_FUNCTION_INDEX_LEB
33 # CHECK-NEXT: Index: 1
34 # CHECK-NEXT: Offset: 0x9
37 # CHECK-NEXT: Segments:
38 # CHECK-NEXT: - SectionOffset: 7
39 # CHECK-NEXT: InitFlags: 0
41 # CHECK-NEXT: Opcode: I32_CONST
42 # CHECK-NEXT: Value: 1024
43 # CHECK-NEXT: Content: '00000000'
45 # CHECK: - Type: CUSTOM
46 # CHECK-NEXT: Name: linking
47 # CHECK-NEXT: Version: 2
48 # CHECK-NEXT: SymbolTable:
49 # CHECK-NEXT: - Index: 0
50 # CHECK-NEXT: Kind: FUNCTION
51 # CHECK-NEXT: Name: _start
52 # CHECK-NEXT: Flags: [ ]
53 # CHECK-NEXT: Function: 0
54 # CHECK-NEXT: - Index: 1
55 # CHECK-NEXT: Kind: FUNCTION
56 # CHECK-NEXT: Name: ret32
57 # CHECK-NEXT: Flags: [ ]
58 # CHECK-NEXT: Function: 1
59 # CHECK-NEXT: - Index: 2
60 # CHECK-NEXT: Kind: DATA
61 # CHECK-NEXT: Name: __stack_low
62 # CHECK-NEXT: Flags: [ VISIBILITY_HIDDEN, ABSOLUTE ]
63 # CHECK-NEXT: Offset: 1040