Add no_resolve to LoadArgs and wasm_runtime_resolve_symbols (#3790)
Add no_resolve to LoadArgs and wasm_runtime_resolve_symbols so one can delay resolving of symbols. This is useful for inspecting the module between loading and instantiating.
This commit is contained in:
@ -1484,6 +1484,22 @@ wasm_runtime_load_ex(uint8 *buf, uint32 size, const LoadArgs *args,
|
||||
error_buf_size);
|
||||
}
|
||||
|
||||
WASM_RUNTIME_API_EXTERN bool
|
||||
wasm_runtime_resolve_symbols(WASMModuleCommon *module)
|
||||
{
|
||||
#if WASM_ENABLE_INTERP != 0
|
||||
if (module->module_type == Wasm_Module_Bytecode) {
|
||||
return wasm_resolve_symbols((WASMModule *)module);
|
||||
}
|
||||
#endif
|
||||
#if WASM_ENABLE_AOT != 0
|
||||
if (module->module_type == Wasm_Module_AoT) {
|
||||
return aot_resolve_symbols((AOTModule *)module);
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
WASMModuleCommon *
|
||||
wasm_runtime_load(uint8 *buf, uint32 size, char *error_buf,
|
||||
uint32 error_buf_size)
|
||||
|
||||
Reference in New Issue
Block a user