[LLD][COFF] Ignore DEBUG_S_XFGHASH_TYPE/VIRTUAL
[llvm-project.git] / lld / test / wasm / wrap.s
blob6c6b8baa82b6931e75fe8e98c33c080b6e3a14a3
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)
7 .globl foo
8 .globl _start
9 .globl __wrap_foo
11 foo:
12 .functype foo () -> (i32)
13 i32.const 1
14 end_function
16 _start:
17 .functype _start () -> ()
18 call foo
19 drop
20 end_function
22 __wrap_foo:
23 .functype __wrap_foo () -> (i32)
24 call __real_foo
25 end_function
27 # CHECK: - Type: CODE
28 # CHECK-NEXT: Relocations:
29 # CHECK-NEXT: - Type: R_WASM_FUNCTION_INDEX_LEB
30 # CHECK-NEXT: Index: 2
31 # CHECK-NEXT: Offset:
32 # CHECK-NEXT: - Type: R_WASM_FUNCTION_INDEX_LEB
33 # CHECK-NEXT: Index: 0
34 # CHECK-NEXT: Offset:
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