@@ -100,18 +100,15 @@ wasm_application_execute_main(WASMModuleInstanceCommon *module_inst, int32 argc,
100100 return wasm_runtime_create_exec_env_and_call_wasm (module_inst , func , 0 ,
101101 NULL );
102102 }
103- else {
104- wasm_runtime_set_exception (
105- module_inst , "lookup _start function failed, may run with \'-f\'" );
106- return false;
107- }
108103#endif /* end of WASM_ENABLE_LIBC_WASI */
109104
110105 if (!(func = wasm_runtime_lookup_function (module_inst , "main" , NULL ))
111106 && !(func = wasm_runtime_lookup_function (module_inst ,
112107 "__main_argc_argv" , NULL ))
113108 && !(func = wasm_runtime_lookup_function (module_inst , "_main" , NULL ))) {
114- wasm_runtime_set_exception (module_inst , "lookup main function failed" );
109+ wasm_runtime_set_exception (
110+ module_inst ,
111+ "lookup the entry point symbol(like _start, _main, _main) failed" );
115112 return false;
116113 }
117114
@@ -244,9 +241,9 @@ resolve_function(WASMModuleInstanceCommon *module_inst, const char *name,
244241{
245242 WASMFunctionInstanceCommon * target_func = NULL ;
246243 WASMModuleInstanceCommon * target_inst = NULL ;
247- char * function_name = NULL ;
248244
249245#if WASM_ENABLE_MULTI_MODULE != 0
246+ char * function_name = NULL ;
250247 char * orig_name = NULL ;
251248 char * sub_module_name = NULL ;
252249 uint32 length = (uint32 )(strlen (name ) + 1 );
@@ -276,7 +273,7 @@ resolve_function(WASMModuleInstanceCommon *module_inst, const char *name,
276273 target_inst = module_inst ;
277274 }
278275#else
279- function_name = name ;
276+ const char * function_name = name ;
280277 target_inst = module_inst ;
281278#endif
282279
0 commit comments