;
}
-void _init()
+void _exit(int status)
{
- main();
+ // Make sure gcc doesn't inline _exit, so we can actually set a breakpoint
+ // on it.
+ volatile int i = 42;
+ while (i)
+ ;
+ // _exit isn't supposed to return.
while (1)
;
}
+
+void _init()
+{
+ _exit(main());
+}