Jack Jansen | 7467ce3 | 1995-02-13 11:41:40 +0000 | [diff] [blame] | 1 | /* |
| 2 | ** mac __start for python-with-shared-library. |
| 3 | ** |
| 4 | ** Partially stolen from MW Startup.c, which is |
| 5 | ** Copyright © 1993 metrowerks inc. All Rights Reserved. |
| 6 | */ |
| 7 | |
| 8 | #include <setjmp.h> |
| 9 | |
Jack Jansen | eb26368 | 1996-02-20 16:26:19 +0000 | [diff] [blame] | 10 | /* |
| 11 | * clear_stackframe_backlink - set 0(SP) to 0 |
| 12 | * |
| 13 | */ |
| 14 | |
| 15 | static asm void clear_stackframe_backlink(void) |
| 16 | { |
| 17 | li r3,0 |
| 18 | stw r3,0(SP) |
| 19 | blr |
| 20 | } |
Jack Jansen | 7467ce3 | 1995-02-13 11:41:40 +0000 | [diff] [blame] | 21 | |
| 22 | void __start(void) |
| 23 | { |
| 24 | char *argv = 0; |
| 25 | |
Jack Jansen | eb26368 | 1996-02-20 16:26:19 +0000 | [diff] [blame] | 26 | clear_stackframe_backlink(); |
| 27 | main(0, &argv); |
| 28 | exit(0); |
Jack Jansen | 7467ce3 | 1995-02-13 11:41:40 +0000 | [diff] [blame] | 29 | } |