Skip to content

Commit cd3f420

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

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

core/iwasm/compilation/aot_emit_aot_file.c

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

0 commit comments

Comments
 (0)