Skip to content

Conversation

@no1wudi
Copy link
Collaborator

@no1wudi no1wudi commented Dec 6, 2021

WAMRC will emit E_TYPE_XIP while enable indirect mode, this will break the capability.

@no1wudi no1wudi force-pushed the main branch 2 times, most recently from 9595435 to ead9224 Compare December 7, 2021 03:16
@no1wudi no1wudi changed the title Support force XIP mode for small apps Add new E_TYPE_XIP to indicate XIP mode Dec 7, 2021
Copy link
Contributor

@wenyongh wenyongh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And should also modify function wasm_runtime_is_xip_file in wasm_runtime_common.c

@no1wudi no1wudi force-pushed the main branch 2 times, most recently from 9666456 to 2ad4e07 Compare December 7, 2021 07:08
Copy link
Contributor

@wenyongh wenyongh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, after testing , we found several issues, could you please help modify:

  1. aot_loader.c, about Line 1470:
    Change
    if ((module->code_size > 0) && (module->native_symbol_count == 0)) {
    to
    if ((module->code_size > 0) && !module->is_indirect_mode) {

  2. aot_loader.c, about Line 480:
    remove
    module->native_symbol_count = cnt;

  3. aot_runtime.h
    remove native_symbol_count field in struct AOTModule

To test spec cases for AOT with XIP mode, you can:
cd tests/wamr-test-suites
./test_wamr.sh -s spec -t aot -X

@wenyongh wenyongh merged commit 208cafc into bytecodealliance:main Dec 8, 2021
vickiegpt pushed a commit to vickiegpt/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
Emit e_type = E_TYPE_XIP in target info section to indicate that it is
an XIP file, and replace related checks in aot loader.
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

Successfully merging this pull request may close these issues.

2 participants