2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
+ * sysdeps/sh/abort-instr.h: New file.
+ * sysdeps/unix/sysv/linux/sh/makecontext.S (.Lexitcode): Terminate the
+ process in case exit returns.
+
* sysdeps/unix/sysv/linux/sh/makecontext.S (.Lexitcode): Always
initialize the GOT register before use.
--- /dev/null
+/* An instruction which should crash any program is `sleep'. */
+#define ABORT_INSTRUCTION_ASM sleep
+#define ABORT_INSTRUCTION asm ("sleep")
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
+#include <abort-instr.h>
#include "ucontext_i.h"
#endif
jsr @r1
mov r0, r4
-0:
- bra 0b
- nop
+ /* The 'exit' call should never return. In case it does cause the
+ process to terminate. */
+ ABORT_INSTRUCTION_ASM
.align 2
#ifdef PIC