55 lines · plain
1# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s2# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/ret32.s -o %t.ret32.o3 4# RUN: wasm-ld -shared --experimental-pic -o %t.ret32.so %t.ret32.o5# RUN: obj2yaml %t.ret32.so | FileCheck %s -check-prefix=SO16 7# Without linking against the ret32.so shared object we expect an undefined8# symbol error9 10# RUN: not wasm-ld -shared --experimental-pic -o %t.so %t.o 2>&1 | FileCheck %s --check-prefix=ERROR11# ERROR: undefined symbol: ret3212 13# RUN: wasm-ld -shared --experimental-pic -o %t.so %t.o %t.ret32.so14# RUN: obj2yaml %t.so | FileCheck %s -check-prefix=SO215 16 17.globl foo18.globl data19 20.functype ret32 (f32) -> (i32)21 22foo:23 .functype foo (f32) -> (i32)24 local.get 025 call ret3226 end_function27 28.section .data,"",@29data:30 .p2align 231 .int32 032 .size data,433 34 35# SO1: Sections:36# SO1-NEXT: - Type: CUSTOM37# SO1-NEXT: Name: dylink.038# SO1-NEXT: MemorySize: 039# SO1-NEXT: MemoryAlignment: 040# SO1-NEXT: TableSize: 041# SO1-NEXT: TableAlignment: 042# SO1-NEXT: Needed: []43# SO1-NEXT: - Type: TYPE44 45# SO2: Sections:46# SO2-NEXT: - Type: CUSTOM47# SO2-NEXT: Name: dylink.048# SO2-NEXT: MemorySize: 449# SO2-NEXT: MemoryAlignment: 250# SO2-NEXT: TableSize: 051# SO2-NEXT: TableAlignment: 052# SO2-NEXT: Needed:53# SO2-NEXT: - shared-needed.s.tmp.ret32.so54# SO2-NEXT: - Type: TYPE55