Index: test/wasm/undefined-entry.test =================================================================== --- test/wasm/undefined-entry.test +++ test/wasm/undefined-entry.test @@ -2,3 +2,9 @@ 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 Index: wasm/Driver.cpp =================================================================== --- wasm/Driver.cpp +++ wasm/Driver.cpp @@ -349,8 +349,6 @@ Sym->setHidden(false); } - if (!Config->Entry.empty() && !Symtab->find(Config->Entry)->isDefined()) - error("entry point not found: " + Config->Entry); if (errorCount()) return;