abort ();
}
if (!ji)
- mono_handle_native_sigsegv (SIGSEGV, sigctx, siginfo);
+ mono_handle_native_sigsegv ("SIGSEGV", sigctx, siginfo);
/* setup a call frame on the real stack so that control is returned there
* and exception handling can continue.
* The frame looks like:
}
#else
UCONTEXT_REG_NIP(uc) = (unsigned long)altstack_handle_and_restore;
+#if _CALL_ELF == 2
+ /* ELF v2 ABI calling convention requires to put the target address into
+ * r12 if we use the global entry point of a function. */
+ UCONTEXT_REG_Rn(uc, 12) = (unsigned long) altstack_handle_and_restore;
+#endif
#endif
UCONTEXT_REG_Rn(uc, 1) = (unsigned long)sp;
UCONTEXT_REG_Rn(uc, PPC_FIRST_ARG_REG) = (unsigned long)(sp + 16);
}
#else
UCONTEXT_REG_NIP(uc) = (unsigned long)func;
+#if _CALL_ELF == 2
+ /* ELF v2 ABI calling convention requires to put the target address into
+ * r12 if we use the global entry point of a function. */
+ UCONTEXT_REG_Rn(uc, 12) = (unsigned long) func;
+#endif
#endif
#endif
}