[WebAssembly] Remove custom handling for undefined entry
This code was needed back when we were not able to write out the synthetic symbol for main. Add tests to make sure we can handle this now. Differential Revision: https://reviews.llvm.org/D42322 llvm-svn: 323020
This commit is contained in:
parent
0699f57bc7
commit
77ee17d191
|
@ -2,3 +2,9 @@ RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/ret32.ll -
|
|||
RUN: not lld -flavor wasm -o %t.wasm %t.ret32.o 2>&1 | FileCheck %s
|
||||
|
||||
CHECK: error: undefined symbol: _start
|
||||
|
||||
RUN: not lld -flavor wasm -entry=foo -o %t.wasm %t.ret32.o 2>&1 | FileCheck %s -check-prefix=CHECK-CUSTOM
|
||||
|
||||
CHECK-CUSTOM: error: undefined symbol: foo
|
||||
|
||||
RUN: lld -flavor wasm -entry=foo --allow-undefined -o %t.wasm %t.ret32.o
|
||||
|
|
|
@ -349,8 +349,6 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) {
|
|||
Sym->setHidden(false);
|
||||
}
|
||||
|
||||
if (!Config->Entry.empty() && !Symtab->find(Config->Entry)->isDefined())
|
||||
error("entry point not found: " + Config->Entry);
|
||||
if (errorCount())
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in New Issue