Enhance XIP and add XIP document (#863)
Auto detect whether file is XIP file before loading module in posix like and linux-sgx platforms, and if yes, mmap executable memory automatically to run the XIP file. Add document about XIP feature. Enable test spec cases with XIP feature.
This commit is contained in:
@ -235,6 +235,17 @@ wasm_runtime_free(void *ptr);
|
||||
WASM_RUNTIME_API_EXTERN package_type_t
|
||||
get_package_type(const uint8_t *buf, uint32_t size);
|
||||
|
||||
/**
|
||||
* Check whether a file is an AOT XIP (Execution In Place) file
|
||||
*
|
||||
* @param buf the package buffer
|
||||
* @param size the package buffer size
|
||||
*
|
||||
* @return true if success, false otherwise
|
||||
*/
|
||||
WASM_RUNTIME_API_EXTERN bool
|
||||
wasm_runtime_is_xip_file(const uint8_t *buf, uint32_t size);
|
||||
|
||||
/**
|
||||
* It is a callback for WAMR providing by embedding to load a module file
|
||||
* into a buffer
|
||||
|
||||
Reference in New Issue
Block a user