Просмотр исходного кода

aot_resolve_object_relocation_group: adapt to LLVM 19 (#4254)

cf.
https://github.com/llvm/llvm-project/pull/95031
https://github.com/llvm/llvm-project/pull/89693
YAMAMOTO Takashi 8 месяцев назад
Родитель
Сommit
0a8994a2d5
1 измененных файлов с 9 добавлено и 0 удалено
  1. 9 0
      core/iwasm/compilation/aot_emit_aot_file.c

+ 9 - 0
core/iwasm/compilation/aot_emit_aot_file.c

@@ -4011,6 +4011,15 @@ aot_resolve_object_relocation_group(AOTObjectData *obj_data,
 #if LLVM_VERSION_MAJOR >= 16
                 /* cf. https://reviews.llvm.org/D123264 */
                 || str_starts_with(relocation->symbol_name, ".Lpcrel_hi")
+#endif
+#if LLVM_VERSION_MAJOR >= 19
+                /* cf.
+                 * https://github.com/llvm/llvm-project/pull/95031
+                 * https://github.com/llvm/llvm-project/pull/89693
+                 *
+                 * note: the trailing space in ".L0 " is intentional. */
+                || !strcmp(relocation->symbol_name, "")
+                || !strcmp(relocation->symbol_name, ".L0 ")
 #endif
                     )) {
             /* change relocation->relocation_addend and