wasm-micro-runtime
wasm-micro-runtime copied to clipboard
How to use the object format file which output by wamrc ?
I create a ELF object file with wamrc,but i understand how to use it.
.\wamrc.exe --format=object --target-abi=eabi --target=aarch64 -o script.o .\script.wasm
It could not loaded by iwasm. May be link with iwasm?
// core/iwasm/common/wasm_runtime_common.c
PackageType
get_package_type(const uint8 *buf, uint32 size)
{
if (buf && size >= 4) {
if (buf[0] == '\0' && buf[1] == 'a' && buf[2] == 's' && buf[3] == 'm')
return Wasm_Module_Bytecode;
if (buf[0] == '\0' && buf[1] == 'a' && buf[2] == 'o' && buf[3] == 't')
return Wasm_Module_AoT;
}
return Package_Type_Unknown;
}
I am afraid that --format=object is just for debugging and iwasm only accept .wasm and .aot.