1 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %s -o %t.o
2 # RUN: wasm-ld -wrap nosuchsym -wrap foo -o %t.wasm %t.o
3 # RUN: wasm-ld -emit-relocs -wrap foo -o %t.wasm %t.o
4 # RUN: obj2yaml %t.wasm | FileCheck %s
6 .functype __real_foo () -> (i32)
12 .functype foo () -> (i32)
17 .functype _start () -> ()
23 .functype __wrap_foo () -> (i32)
28 # CHECK-NEXT: Relocations:
29 # CHECK-NEXT: - Type: R_WASM_FUNCTION_INDEX_LEB
30 # CHECK-NEXT: Index: 2
32 # CHECK-NEXT: - Type: R_WASM_FUNCTION_INDEX_LEB
33 # CHECK-NEXT: Index: 0
36 # CHECK: FunctionNames:
37 # CHECK-NEXT: - Index: 0
38 # CHECK-NEXT: Name: foo
39 # CHECK-NEXT: - Index: 1
40 # CHECK-NEXT: Name: _start
41 # CHECK-NEXT: - Index: 2
42 # CHECK-NEXT: Name: __wrap_foo