summaryrefslogtreecommitdiffstats
path: root/Mac/mwerks/macuseshlstart.c
blob: edbb24628a734e2a21ec5b51f5f336d2becaef3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
** mac __start for python-with-shared-library.
**
** Partially stolen from MW Startup.c, which is
**	Copyright © 1993 metrowerks inc. All Rights Reserved.
*/

#include <setjmp.h>

/*
 *	clear_stackframe_backlink	-	set 0(SP) to 0
 *
 */

static asm void clear_stackframe_backlink(void)
{
		li		r3,0
		stw		r3,0(SP)
		blr
}

void __start(void)
{
	char *argv = 0;
	
	clear_stackframe_backlink();
	main(0, &argv);
	exit(0);
}