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 5 6target triple = "wasm32-unknown-unknown" 7 8declare i32 @ret32(float) 9 10define void @unused_function() { 11 ret void 12} 13 14define hidden void @_start() local_unnamed_addr #0 { 15entry: 16 call i32 @ret32(float 0.0) 17 ret void 18} 19 20; CHECK: - Type: CODE 21; CHECK-NEXT: Relocations: 22; CHECK-NEXT: - Type: R_WASM_FUNCTION_INDEX_LEB 23; CHECK-NEXT: Index: 1 24; CHECK-NEXT: Offset: 0x9 25 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 40