-
Notifications
You must be signed in to change notification settings - Fork 646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiling WASM to AOT loses the import table. #4038
Comments
The import table in aot isn't fully functional yet, which is why you see the discrepancy here, may I ask your use case? There may be a workaround for your use case |
I use this small WAT module: And my build configuration is:
|
Also I meet another question when using AOT. The module I used is: |
Hi, could you print more log for the custom section? iwasm -v=5 test.aot |
Of course, I'd like to show you more logs. However, I compiled and ran it on Android, using libiwasm.so. Could you tell me how to print more logs for libiwasm.so? More details about the custom section is that I found that it may not support compiling WAT with a custom section into WASM. Really thank you for your help. If you have any ideas about the custom section issue or the import table issue, please let me know. Thanks again. |
About import table, it will be functional and used as your example after the development of instnatiation linking, which could take some time. For printing logs, you can use |
Thanks for your answer. For the custom section test, the log is as follows:
|
About the custom section: --emit-custom-sections=<section names>
Emit the specified custom sections to AoT file, using comma to separate
multiple names, e.g.
--emit-custom-sections=section1,section2,sectionN I tested it on my local machine, and the aot file will have the custome section. |
This is actually the solution! Really thanks for your help! |
No worries, I am glad it works |
@TianlongLiang
I don't know whether it's my fault that I should add some options but didn't, or if it is designed like this now. The command I used is as follows:
Could you give some help again? |
Basically, if you want to import and share the globals/tables/memories among your wasm apps, it needs instnatiation linking, and it isn't supported now. And if you don't have share demand, treating an import as a non-import is the same thing, that's what WAMR does now(in aot compiler) and it complies with your observation. |
I compiled a WASM file to an AOT file using WAMRC, which only has one import table.
However, when I debug it, I find that
module->import_table_count
is always 0 in the filewasm-micro-runtime/core/iwasm/aot/aot_loader.c
, the functionload_table_info
, whilemodule->table_count
is 1.This is how I compile it:
wamrc --bounds-checks=1 --target=aarch64 -o output.aot output.wasm
.I wonder how this happens, and how I could solve it.
The text was updated successfully, but these errors were encountered: