Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/sys/arm/crt0.S')
-rw-r--r--newlib/libc/sys/arm/crt0.S4
1 files changed, 4 insertions, 0 deletions
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)