Refine codes and fix several issues (#882)
Refine some codes in wasm loader Add -Wshadow to gcc compile flags and fix some variable shadowed issues Fix function parameter/return types not checked issue Fix fast-interp loader reserve_block_ret() not handle V128 return type issue Fix mini loader load_table_segment_section() failed issue Add detailed comments for argc argument in wasm_runtime_call_wasm()
This commit is contained in:
@ -1454,14 +1454,14 @@ load_text_section(const uint8 *buf, const uint8 *buf_end, AOTModule *module,
|
||||
/* Now code points to an ELF object, we pull it down to .text section */
|
||||
uint64 offset;
|
||||
uint64 size;
|
||||
char *buf = module->code;
|
||||
module->elf_hdr = buf;
|
||||
if (!get_text_section(buf, &offset, &size)) {
|
||||
char *code_buf = module->code;
|
||||
module->elf_hdr = code_buf;
|
||||
if (!get_text_section(code_buf, &offset, &size)) {
|
||||
set_error_buf(error_buf, error_buf_size,
|
||||
"get text section of ELF failed");
|
||||
return false;
|
||||
}
|
||||
module->code = buf + offset;
|
||||
module->code = code_buf + offset;
|
||||
module->code_size -= (uint32)offset;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user