-
-
Save rolfbjarne/0b4f9dfbedd8883f1702 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/mono/mini/aot-runtime.c b/mono/mini/aot-runtime.c | |
index 5f76ca7..abcc04f 100644 | |
--- a/mono/mini/aot-runtime.c | |
+++ b/mono/mini/aot-runtime.c | |
@@ -3225,9 +3225,13 @@ mono_aot_get_plt_entry (guint8 *code) | |
g_assert_not_reached (); | |
#endif | |
- if ((target >= (guint8*)(amodule->plt)) && (target < (guint8*)(amodule->plt_end))) | |
+ if ((target >= (guint8*)(amodule->plt)) && (target < (guint8*)(amodule->plt_end))) { | |
+ guint8 *code2 = (guint8*) *(guint32*)target; | |
+ guint8 *target2 = mono_arch_get_call_target (code2); | |
+ if ((target2 >= (guint8*)(amodule->plt)) && (target2 < (guint8*)(amodule->plt_end))) | |
+ return target2; | |
return target; | |
- else | |
+ } else | |
return NULL; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment