brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 13f2a21 Raw
40 lines · plain
1# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-emscripten -o %t.o %s2# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-emscripten %p/Inputs/ret32.s -o %t.ret32.o3# RUN: wasm-ld --experimental-pic -shared %t.ret32.o -o %t.lib.so4 5## Fails with signature mismatch by default6# RUN: not wasm-ld --experimental-pic -pie -o %t.wasm %t.o %t.lib.so 2>&1 | FileCheck --check-prefix=ERROR %s7## Same again with shared library first.8# RUN: not wasm-ld --experimental-pic -pie -o %t.wasm %t.lib.so %t.o 2>&1 | FileCheck --check-prefix=ERROR %s9 10## Succeeds with --no-shlib-sigcheck added11# RUN: wasm-ld --experimental-pic -pie -o %t.wasm %t.o %t.lib.so --no-shlib-sigcheck12# RUN: obj2yaml %t.wasm | FileCheck %s13## Same again with shared library first.14# RUN: wasm-ld --experimental-pic -pie -o %t.wasm %t.lib.so %t.o --no-shlib-sigcheck15# RUN: obj2yaml %t.wasm | FileCheck %s16 17.functype ret32 (f32) -> (i64)18 19.globl _start20_start:21  .functype _start () -> ()22  f32.const 0.023  call ret3224  drop25  end_function26 27# ERROR: wasm-ld: error: function signature mismatch: ret3228# ERROR: >>> defined as (f32) -> i64 in {{.*}}.o29 30# CHECK:       - Type:            TYPE31# CHECK-NEXT:    Signatures:32# CHECK-NEXT:      - Index:           033# CHECK-NEXT:        ParamTypes:34# CHECK-NEXT:          - F3235# CHECK-NEXT:        ReturnTypes:36# CHECK-NEXT:          - I6437# CHECK-NEXT:      - Index:           138# CHECK-NEXT:        ParamTypes:      []39# CHECK-NEXT:        ReturnTypes:     []40