mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2026-04-18 18:18:44 +00:00
Fix LLVM ORC JIT relocation failure caused by InternalLinkage stack_sizes (#4880)
Signed-off-by: zhenweijin <zhenwei.jin@intel.com>
This commit is contained in:
parent
fcec30e933
commit
bdb58e042b
|
|
@ -1834,18 +1834,12 @@ aot_create_stack_sizes(const AOTCompData *comp_data, AOTCompContext *comp_ctx)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* make the original symbol internal. we mainly use this version to
|
|
||||||
* avoid creating extra relocations in the precheck functions.
|
|
||||||
*/
|
|
||||||
LLVMSetLinkage(stack_sizes, LLVMInternalLinkage);
|
|
||||||
/*
|
|
||||||
* for AOT, place it into a dedicated section for the convenience
|
|
||||||
* of the AOT file generation and symbol resolutions.
|
|
||||||
*
|
|
||||||
* for JIT, it doesn't matter.
|
|
||||||
*/
|
|
||||||
if (!comp_ctx->is_jit_mode) {
|
if (!comp_ctx->is_jit_mode) {
|
||||||
|
LLVMSetLinkage(stack_sizes, LLVMInternalLinkage);
|
||||||
|
/*
|
||||||
|
* for AOT, place it into a dedicated section for the convenience
|
||||||
|
* of the AOT file generation and symbol resolutions.
|
||||||
|
*/
|
||||||
LLVMSetSection(stack_sizes, aot_stack_sizes_section_name);
|
LLVMSetSection(stack_sizes, aot_stack_sizes_section_name);
|
||||||
}
|
}
|
||||||
comp_ctx->stack_sizes_type = stack_sizes_type;
|
comp_ctx->stack_sizes_type = stack_sizes_type;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user