42 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: llvm-mc -filetype=obj -triple=wasm32-unknown-emscripten %p/Inputs/libsearch-dyn.s -o %t.dyn.o4# RUN: wasm-ld --experimental-pic -shared %t.ret32.o %t.dyn.o -o %t.lib.so5# RUN: not wasm-ld --experimental-pic -pie -o %t.wasm %t.o 2>&1 | FileCheck --check-prefix=ERROR %s6# RUN: wasm-ld --experimental-pic -pie -o %t.wasm %t.o %t.lib.so7# RUN: obj2yaml %t.wasm | FileCheck %s8 9# Same again for wasm6410 11# RUN: llvm-mc -filetype=obj -triple=wasm64-unknown-emscripten -o %t.o %s12# RUN: llvm-mc -filetype=obj -triple=wasm64-unknown-emscripten %p/Inputs/ret32.s -o %t.ret32.o13# RUN: llvm-mc -filetype=obj -triple=wasm64-unknown-emscripten %p/Inputs/libsearch-dyn.s -o %t.dyn.o14# RUN: wasm-ld --experimental-pic -mwasm64 -shared %t.ret32.o %t.dyn.o -o %t.lib.so15# RUN: not wasm-ld --experimental-pic -mwasm64 -pie -o %t.wasm %t.o 2>&1 | FileCheck --check-prefix=ERROR %s16# RUN: wasm-ld --experimental-pic -mwasm64 -pie -o %t.wasm %t.o %t.lib.so17# RUN: obj2yaml %t.wasm | FileCheck %s18 19# ERROR: error: {{.*}}: undefined symbol: ret3220# ERROR: error: {{.*}}: undefined symbol: _bar21.functype ret32 (f32) -> (i32)22 23.globl _start24_start:25 .functype _start () -> ()26 f32.const 0.027 call ret3228 drop29 i32.const _bar@GOT30 drop31 end_function32 33# CHECK: Sections:34# CHECK-NEXT: - Type: CUSTOM35# CHECK-NEXT: Name: dylink.036# CHECK-NEXT: MemorySize: 037# CHECK-NEXT: MemoryAlignment: 038# CHECK-NEXT: TableSize: 039# CHECK-NEXT: TableAlignment: 040# CHECK-NEXT: Needed:41# CHECK-NEXT: - {{.*}}.lib.so42