Skip to content

Commit 344e74c

Browse files
committed
aot_resolve_object_relocation_group: adapt to LLVM 19
1 parent 8286d8c commit 344e74c

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

core/iwasm/compilation/aot_emit_aot_file.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3998,8 +3998,17 @@ aot_resolve_object_relocation_group(AOTObjectData *obj_data,
39983998
&& (str_starts_with(relocation->symbol_name, ".LCPI")
39993999
|| str_starts_with(relocation->symbol_name, ".LJTI")
40004000
|| str_starts_with(relocation->symbol_name, ".LBB")
4001-
|| str_starts_with(relocation->symbol_name,
4002-
".Lswitch.table."))) {
4001+
|| str_starts_with(relocation->symbol_name, ".Lswitch.table.")
4002+
#if LLVM_VERSION_MAJOR >= 19
4003+
/* cf.
4004+
* https://github.com/llvm/llvm-project/pull/95031
4005+
* https://github.com/llvm/llvm-project/pull/89693
4006+
*
4007+
* note: the trailing space in ".L0 " is intentional. */
4008+
|| !strcmp(relocation->symbol_name, "")
4009+
|| !strcmp(relocation->symbol_name, ".L0 ")
4010+
#endif
4011+
)) {
40034012
/* change relocation->relocation_addend and
40044013
relocation->symbol_name */
40054014
LLVMSectionIteratorRef contain_section;

0 commit comments

Comments
 (0)