
This matches the behavior of the ELF linker where -u/--undefined means symbols will get pulled in from archives but won't result in link error if they are missing. Also, don't actually great symbol table entries for the undefined symbols, again matching more closely the ELF linker. This also results in simplification of the code. Differential Revision: https://reviews.llvm.org/D50279 llvm-svn: 338938
20 lines
497 B
LLVM
20 lines
497 B
LLVM
; RUN: llc -filetype=obj %s -o %t.o
|
|
; RUN: not wasm-ld -o %t.wasm %t.o 2>&1 | FileCheck %s
|
|
|
|
; CHECK: error: {{.*}}.o: undefined symbol: foo(int)
|
|
|
|
; RUN: not wasm-ld --no-demangle \
|
|
; RUN: -o %t.wasm %t.o 2>&1 | FileCheck -check-prefix=CHECK-NODEMANGLE %s
|
|
|
|
; CHECK-NODEMANGLE: error: {{.*}}.o: undefined symbol: _Z3fooi
|
|
|
|
target triple = "wasm32-unknown-unknown"
|
|
|
|
declare void @_Z3fooi(i32);
|
|
|
|
define hidden void @_start() local_unnamed_addr {
|
|
entry:
|
|
call void @_Z3fooi(i32 1)
|
|
ret void
|
|
}
|