brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 6c6b8ba Raw
43 lines · plain
1# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %s -o %t.o2# RUN: wasm-ld -wrap nosuchsym -wrap foo -o %t.wasm %t.o3# RUN: wasm-ld -emit-relocs -wrap foo -o %t.wasm %t.o4# RUN: obj2yaml %t.wasm | FileCheck %s5 6.functype __real_foo () -> (i32)7.globl foo8.globl _start9.globl __wrap_foo10 11foo:12  .functype foo () -> (i32)13  i32.const 114  end_function15 16_start:17  .functype _start () -> ()18  call  foo19  drop20  end_function21 22__wrap_foo:23  .functype __wrap_foo () -> (i32)24  call  __real_foo25  end_function26 27# CHECK:      - Type:            CODE28# CHECK-NEXT:   Relocations:29# CHECK-NEXT:     - Type:            R_WASM_FUNCTION_INDEX_LEB30# CHECK-NEXT:       Index:           231# CHECK-NEXT:       Offset:32# CHECK-NEXT:     - Type:            R_WASM_FUNCTION_INDEX_LEB33# CHECK-NEXT:       Index:           034# CHECK-NEXT:       Offset:35 36# CHECK:        FunctionNames:37# CHECK-NEXT:      - Index:           038# CHECK-NEXT:        Name:            foo39# CHECK-NEXT:      - Index:           140# CHECK-NEXT:        Name:            _start41# CHECK-NEXT:      - Index:           242# CHECK-NEXT:        Name:            __wrap_foo43