xip: Lookup float constants from table to reduce relocations (#894)

Lookup float/double constants from exec_env->native_symbol table
but not construct them with LLVMBuildConst if XIP mode is enabled,
these constants are introduced by f32/f64.const opcodes and some
float/double conversion opcodes, and make wamrc generate some
relocations in text section of AOT XIP file. This patch eliminates such
relocations when "--enable-indirect-mode" is added to wamrc.
This commit is contained in:
Wenyong Huang
2021-12-16 21:39:23 +08:00
committed by GitHub
parent f2d87ec02e
commit 5be427bfa2
6 changed files with 287 additions and 45 deletions

View File

@ -268,7 +268,7 @@ typedef struct AOTCompData {
typedef struct AOTNativeSymbol {
bh_list_link link;
const char *symbol;
char symbol[32];
int32 index;
} AOTNativeSymbol;