mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-02-06 06:55:07 +00:00
Fix aot code failed to run on darwin/android issue (#599)
This commit is contained in:
parent
7db2221ad9
commit
fe76c89c25
|
@ -1838,7 +1838,7 @@ load_relocation_section(const uint8 *buf, const uint8 *buf_end,
|
|||
}
|
||||
|
||||
/* Set read only for AOT code and some data sections */
|
||||
map_prot = MMAP_PROT_READ;
|
||||
map_prot = MMAP_PROT_READ | MMAP_PROT_EXEC;
|
||||
|
||||
if (module->code) {
|
||||
/* The layout is: literal size + literal + code (with plt table) */
|
||||
|
@ -1848,6 +1848,8 @@ load_relocation_section(const uint8 *buf, const uint8 *buf_end,
|
|||
os_mprotect(mmap_addr, total_size, map_prot);
|
||||
}
|
||||
|
||||
map_prot = MMAP_PROT_READ;
|
||||
|
||||
#if defined(BH_PLATFORM_WINDOWS)
|
||||
if (module->extra_plt_data) {
|
||||
os_mprotect(module->extra_plt_data, module->extra_plt_data_size,
|
||||
|
|
Loading…
Reference in New Issue
Block a user