Skip to content

Commit 73998e4

Browse files
Jiax-cnxiangjia.xj
and
xiangjia.xj
authored
fix: fix load aarch64 aot failed (#4114)
Co-authored-by: xiangjia.xj <[email protected]>
1 parent e693608 commit 73998e4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

core/iwasm/aot/aot_loader.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,8 @@ load_target_info_section(const uint8 *buf, const uint8 *buf_end,
590590
}
591591

592592
/* for backwards compatibility with previous wamrc aot files */
593-
if (!strcmp(target_info.arch, "arm64"))
593+
if (!strcmp(target_info.arch, "arm64")
594+
|| !strcmp(target_info.arch, "aarch64"))
594595
bh_strcpy_s(target_info.arch, sizeof(target_info.arch), "aarch64v8");
595596

596597
/* Check machine info */

core/iwasm/aot/arch/aot_reloc_aarch64.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ get_current_target(char *target_buf, uint32 target_buf_size)
6363
/* Set to "aarch64v8" by default if sub version isn't specified */
6464
if (strcmp(s, "AARCH64") == 0) {
6565
s = "aarch64v8";
66-
s_size = 9; /* strlen("aarch64v8"); */
66+
s_size = 10; /* sizeof("aarch64v8"); */
6767
}
6868
if (target_buf_size < s_size) {
6969
s_size = target_buf_size;

0 commit comments

Comments
 (0)