Revision | afeb48d30197f13f717cf0f6d6792dd5e7cd2d0d (tree) |
---|---|
Time | 2022-11-30 13:01:03 |
Author | Yoshinori Sato <ysato@user...> |
Commiter | Yoshinori Sato |
update uClibc_main arguments
@@ -26,15 +26,24 @@ | ||
26 | 26 | |
27 | 27 | .text |
28 | 28 | |
29 | - /* r1: argc */ | |
30 | - /* r2: argv */ | |
31 | - /* r3: envp */ | |
29 | +/* | |
30 | +void __uClibc_main(int (*main)(int, char **, char **), int argc, | |
31 | + char **argv, void (*app_init)(void), void (*app_fini)(void) | |
32 | + , | |
33 | + void (*rtld_fini)(void), void *stack_end attribute_unused) | |
34 | +*/ | |
32 | 35 | _start: |
36 | + mov.l r0,[-r0] | |
37 | + mov.l #0,r1 | |
38 | + mov.l r1,[-r0] | |
39 | + mov.l r1,[-r0] | |
40 | + mov.l #main, r1 | |
41 | + mov.l #0,r4 | |
33 | 42 | bsr __uClibc_main |
34 | 43 | |
35 | 44 | /* If that didn't kill us, ... */ |
36 | 45 | __exit: |
37 | - mov.l #1,r8 /* NR_exit */ | |
46 | + mov.l #1,r15 /* NR_exit */ | |
38 | 47 | int #0x08 |
39 | 48 | |
40 | 49 | /* |