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/h8300hms')
-rw-r--r--newlib/libc/sys/h8300hms/crt0.S18
1 files changed, 18 insertions, 0 deletions
diff --git a/newlib/libc/sys/h8300hms/crt0.S b/newlib/libc/sys/h8300hms/crt0.S
index 13d907508..b67c103e5 100644
--- a/newlib/libc/sys/h8300hms/crt0.S
+++ b/newlib/libc/sys/h8300hms/crt0.S
@@ -13,7 +13,13 @@ _start:
adds #2,r0
cmp r1,r0
blo .loop
+#ifdef __ELF__
+ mov.w #__fini,r0
+ jsr @_atexit
+ jsr @__init
+#else
jsr @___main
+#endif
jsr @_main
jsr @_exit
@@ -36,7 +42,13 @@ _start:
adds #2,er0
cmp.l er1,er0
blo .loop
+#ifdef __ELF__
+ mov.w #__fini,r0
+ jsr @_atexit
+ jsr @__init
+#else
jsr @___main
+#endif
jsr @_main
jsr @_exit
@@ -59,7 +71,13 @@ _start:
adds #2,er0
cmp.l er1,er0
blo .loop
+#ifdef __ELF__
+ mov.w #__fini,r0
+ jsr @_atexit
+ jsr @__init
+#else
jsr @___main
+#endif
jsr @_main
jsr @_exit