|
|
@@ -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,
|