Skip to content

Commit 25116b4

Browse files
committed
aot_resolve_object_relocation_group: adapt to LLVM 19
1 parent 97ed55e commit 25116b4

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
@@ -4007,8 +4007,17 @@ aot_resolve_object_relocation_group(AOTObjectData *obj_data,
40074007
&& (str_starts_with(relocation->symbol_name, ".LCPI")
40084008
|| str_starts_with(relocation->symbol_name, ".LJTI")
40094009
|| str_starts_with(relocation->symbol_name, ".LBB")
4010-
|| str_starts_with(relocation->symbol_name,
4011-
".Lswitch.table."))) {
4010+
|| str_starts_with(relocation->symbol_name, ".Lswitch.table.")
4011+
#if LLVM_VERSION_MAJOR >= 19
4012+
/* cf.
4013+
* https://github.com/llvm/llvm-project/pull/95031
4014+
* https://github.com/llvm/llvm-project/pull/89693
4015+
*
4016+
* note: the trailing space in ".L0 " is intentional. */
4017+
|| !strcmp(relocation->symbol_name, "")
4018+
|| !strcmp(relocation->symbol_name, ".L0 ")
4019+
#endif
4020+
)) {
40124021
/* change relocation->relocation_addend and
40134022
relocation->symbol_name */
40144023
LLVMSectionIteratorRef contain_section;

0 commit comments

Comments
 (0)