From ac2fe552d518788c17e6a69fc83cfe223b44590e Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Wed, 7 May 2025 12:32:14 +0900 Subject: [PATCH] aot_resolve_object_relocation_group: adapt to LLVM 16 (#4250) cf. https://reviews.llvm.org/D123264 --- core/iwasm/compilation/aot_emit_aot_file.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/iwasm/compilation/aot_emit_aot_file.c b/core/iwasm/compilation/aot_emit_aot_file.c index 29c5828f4..5a7ba9e74 100644 --- a/core/iwasm/compilation/aot_emit_aot_file.c +++ b/core/iwasm/compilation/aot_emit_aot_file.c @@ -4007,8 +4007,12 @@ aot_resolve_object_relocation_group(AOTObjectData *obj_data, && (str_starts_with(relocation->symbol_name, ".LCPI") || str_starts_with(relocation->symbol_name, ".LJTI") || str_starts_with(relocation->symbol_name, ".LBB") - || str_starts_with(relocation->symbol_name, - ".Lswitch.table."))) { + || str_starts_with(relocation->symbol_name, ".Lswitch.table.") +#if LLVM_VERSION_MAJOR >= 16 + /* cf. https://reviews.llvm.org/D123264 */ + || str_starts_with(relocation->symbol_name, ".Lpcrel_hi") +#endif + )) { /* change relocation->relocation_addend and relocation->symbol_name */ LLVMSectionIteratorRef contain_section;