Skip to content

Commit bdb58e0

Browse files
authored
Fix LLVM ORC JIT relocation failure caused by InternalLinkage stack_sizes (#4880)
Signed-off-by: zhenweijin <zhenwei.jin@intel.com>
1 parent fcec30e commit bdb58e0

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

core/iwasm/compilation/aot_llvm.c

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1834,18 +1834,12 @@ aot_create_stack_sizes(const AOTCompData *comp_data, AOTCompContext *comp_ctx)
18341834
return false;
18351835
}
18361836

1837-
/*
1838-
* make the original symbol internal. we mainly use this version to
1839-
* avoid creating extra relocations in the precheck functions.
1840-
*/
1841-
LLVMSetLinkage(stack_sizes, LLVMInternalLinkage);
1842-
/*
1843-
* for AOT, place it into a dedicated section for the convenience
1844-
* of the AOT file generation and symbol resolutions.
1845-
*
1846-
* for JIT, it doesn't matter.
1847-
*/
18481837
if (!comp_ctx->is_jit_mode) {
1838+
LLVMSetLinkage(stack_sizes, LLVMInternalLinkage);
1839+
/*
1840+
* for AOT, place it into a dedicated section for the convenience
1841+
* of the AOT file generation and symbol resolutions.
1842+
*/
18491843
LLVMSetSection(stack_sizes, aot_stack_sizes_section_name);
18501844
}
18511845
comp_ctx->stack_sizes_type = stack_sizes_type;

0 commit comments

Comments
 (0)