1 ## Test that weak undefined symbols do not fetch members from archive files.
2 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %s -o %t.o
3 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/ret32.s -o %t.ret32.o
4 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/hello.s -o %t.hello.o
6 # RUN: llvm-ar rcs %t.a %t.ret32.o %t.hello.o
8 # RUN: wasm-ld %t.o %t.a -o %t.wasm
9 # RUN: obj2yaml %t.wasm | FileCheck %s
11 ## Also test with the library symbols being read first
12 # RUN: wasm-ld %t.a %t.o -o %t2.wasm
13 # RUN: obj2yaml %t2.wasm | FileCheck %s
15 # RUN: wasm-ld -u hello_str %t.o %t.a -o %t2.wasm
16 # RUN: obj2yaml %t2.wasm | FileCheck %s -check-prefix=CHECK-DATA
18 # Weak external function symbol
20 .functype ret32 () -> (i32)
22 # Weak external data symbol
27 .functype _start () -> ()
37 # Ensure we have no data section. If we do, would mean that hello_str was
38 # pulled out of the library.
39 # CHECK-NOT: Type: DATA
40 # CHECK-DATA: Type: DATA
42 # CHECK: Name: 'undefined_weak:ret32'
43 # CHECK-NOT: Name: ret32