Révision | 0b1cf973586e4680eee0cb8ddba51d57c7ba96b4 (tree) |
---|---|
l'heure | 2022-11-30 13:03:06 |
Auteur | Yoshinori Sato <ysato@user...> |
Commiter | Yoshinori Sato |
argv fix
@@ -24,6 +24,9 @@ | ||
24 | 24 | .global atexit |
25 | 25 | .global main |
26 | 26 | |
27 | + .weak _init | |
28 | + .weak _fini | |
29 | + | |
27 | 30 | .text |
28 | 31 | |
29 | 32 | /* |
@@ -33,12 +36,15 @@ void __uClibc_main(int (*main)(int, char **, char **), int argc, | ||
33 | 36 | void (*rtld_fini)(void), void *stack_end attribute_unused) |
34 | 37 | */ |
35 | 38 | _start: |
39 | + mov.l [r0],r2 | |
40 | + add #4,r0,r3 | |
36 | 41 | mov.l r0,[-r0] |
37 | 42 | mov.l #0,r1 |
38 | 43 | mov.l r1,[-r0] |
44 | + mov.l #_fini,r1 | |
39 | 45 | mov.l r1,[-r0] |
40 | 46 | mov.l #main, r1 |
41 | - mov.l #0,r4 | |
47 | + mov.l #_init,r4 | |
42 | 48 | bsr __uClibc_main |
43 | 49 | |
44 | 50 | /* If that didn't kill us, ... */ |