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:
authorXianmiao Qu <cooper.qu@linux.alibaba.com>2023-01-13 15:46:47 +0300
committerCorinna Vinschen <corinna@vinschen.de>2023-01-13 16:08:23 +0300
commit7f4c04755ef84feba6c24b34b539330e5ee2bd4d (patch)
treefa8697745efbc529cefba84ca84fcd4cd7f2db74 /libgloss
parent3ef006f056d0c6fb53e9bf76c6374313d239d5a7 (diff)
libgloss: csky: use atexit to call fini-array functions.
__libc_fini_array should be called upon exit to call the global termination functions in fini-array, use atexit to register it at __start.
Diffstat (limited to 'libgloss')
-rw-r--r--libgloss/csky/crt0.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/libgloss/csky/crt0.S b/libgloss/csky/crt0.S
index a0651a734..49f7da364 100644
--- a/libgloss/csky/crt0.S
+++ b/libgloss/csky/crt0.S
@@ -150,6 +150,8 @@ __start:
* Assember start up done, C codes start here.
*/
__goto_c:
+ lrw r0, __libc_fini_array # Register global termination functions
+ jbsr atexit # to be called upon exit
/*jsri main*/
lrw r5, __libc_init_array
jsr r5