1 ; RUN: llc -filetype=obj %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 target triple = "wasm32-unknown-unknown"
8 declare i32 @ret32(float)
10 define void @unused_function() {
14 define hidden void @_start() local_unnamed_addr #0 {
16 call i32 @ret32(float 0.0)
21 ; CHECK-NEXT: Relocations:
22 ; CHECK-NEXT: - Type: R_WASM_FUNCTION_INDEX_LEB
23 ; CHECK-NEXT: Index: 1
24 ; CHECK-NEXT: Offset: 0x9
26 ; CHECK: - Type: CUSTOM
27 ; CHECK-NEXT: Name: linking
28 ; CHECK-NEXT: Version: 2
29 ; CHECK-NEXT: SymbolTable:
30 ; CHECK-NEXT: - Index: 0
31 ; CHECK-NEXT: Kind: FUNCTION
32 ; CHECK-NEXT: Name: _start
33 ; CHECK-NEXT: Flags: [ ]
34 ; CHECK-NEXT: Function: 0
35 ; CHECK-NEXT: - Index: 1
36 ; CHECK-NEXT: Kind: FUNCTION
37 ; CHECK-NEXT: Name: ret32
38 ; CHECK-NEXT: Flags: [ VISIBILITY_HIDDEN ]
39 ; CHECK-NEXT: Function: 1