Skip to content
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

"invalid relocation offset" when trying to execute AOT binary on ESP32-S3 #4025

Open
SneezingCactus opened this issue Jan 15, 2025 · 0 comments

Comments

@SneezingCactus
Copy link

Hello, I've been using WAMR for my project and I recently decided to give AOT compilation a go. However, I can't seem to get any AOT binary to load and execute properly. It would always throw this error on wasm_runtime_load:

AOT module load failed: invalid relocation offset.

I also tried compiling with the wamrc --xip option enabled as I figured this would make it so that the instructions are executed directly from PSRAM without having to copy into IRAM (which is something I'd want anyways), however by doing this I'm met with a different wasm_runtime_load error:

AOT module load failed: cannot apply relocation to text section for aot file generated with "--enable-indirect-mode" flag

Looking into WAMR's source code and doing some extra logging, I found out that the binary's .rela.literal section was being determined to have a size of 0, causing check_reloc_offset to throw the invalid relocation offset error when relocating this section. This goes way out of my lane of knowledge however, so I don't think I can comment on this further.

I am using the 2.2.0 release of WAMR (though I also tried main branch with same results), AOT binaries are being compiled on Ubuntu 22.04 with LLVM 17.0.1 (Espressif fork), and the WASM host is an ESP32-S3 running on ESP-IDF v5.4.

Is there something I'm missing here? Any help would be very much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant