Add the Windows COFF format support for AOT (#382)

Add the Windows COFF format support to wamr-compiler and iwasm can
load and excute it on Windows(X64) platform.

Signed-off-by: Wu Zhongmin <vwzm@live.com>
Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>

Co-authored-by: Wu Zhongmin <vwzm@live.com>
This commit is contained in:
Xiaokang Qin
2020-09-11 18:32:58 +08:00
committed by GitHub
parent 264e189690
commit 728890103b
4 changed files with 77 additions and 12 deletions

View File

@ -19,6 +19,9 @@ void * os_mmap(void *hint, size_t size, int prot, int flags)
/* integer overflow */
return NULL;
if (request_size == 0)
request_size = page_size;
if (prot & MMAP_PROT_EXEC) {
if (prot & MMAP_PROT_WRITE)
flProtect = PAGE_EXECUTE_READWRITE;