diff options
author | Nick Clifton <nickc@redhat.com> | 2001-12-05 11:51:43 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2001-12-05 11:51:43 +0000 |
commit | e9853806c70218f8accf1fc6be1f324e565090fd (patch) | |
tree | 588c9a12a44ac55fc84f3ab6fa5c2333f19ddb8e | |
parent | b8ed088fac25d5f916fe2dab3978ef5fd33f4529 (diff) | |
download | cygnal-e9853806c70218f8accf1fc6be1f324e565090fd.tar.gz cygnal-e9853806c70218f8accf1fc6be1f324e565090fd.tar.bz2 cygnal-e9853806c70218f8accf1fc6be1f324e565090fd.zip |
For __USES_INITFINI__ preserve the argument vector before calling the
initialisation functions.
-rw-r--r-- | newlib/ChangeLog | 5 | ||||
-rw-r--r-- | newlib/libc/sys/arm/crt0.S | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 3e1a059bc..936bc69ed 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2001-12-05 Nick Clifton <nickc@cambridge.redhat.com> + + * libc/sys/arm/crt0.S: For __USES_INITFINI__ preserve the argument + vector before calling the initialisation functions. + 2001-11-29 Christopher Faylor <cgf@redhat.com> * libc/include/dirent.h: Protect against multiple inclusion. diff --git a/newlib/libc/sys/arm/crt0.S b/newlib/libc/sys/arm/crt0.S index 149dfc9e6..9d1de2ec6 100644 --- a/newlib/libc/sys/arm/crt0.S +++ b/newlib/libc/sys/arm/crt0.S @@ -187,9 +187,13 @@ __change_mode: to create constructors and destructors, and for these targets we need to call the _init function and arrange for _fini to be called at program exit. */ + mov r4, r0 + mov r5, r1 ldr r0, .Lfini bl FUNCTION (atexit) bl FUNCTION (_init) + mov r0, r4 + mov r1, r5 #endif bl FUNCTION (main) |