public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin/main] libgloss: csky: use atexit to call fini-array functions.
@ 2023-01-13 13:08 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2023-01-13 13:08 UTC (permalink / raw)
To: newlib-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=7f4c04755ef84feba6c24b34b539330e5ee2bd4d
commit 7f4c04755ef84feba6c24b34b539330e5ee2bd4d
Author: Xianmiao Qu <cooper.qu@linux.alibaba.com>
AuthorDate: Fri Jan 13 20:46:47 2023 +0800
Commit: Corinna Vinschen <corinna@vinschen.de>
CommitDate: Fri Jan 13 14:08:23 2023 +0100
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.
Diff:
---
libgloss/csky/crt0.S | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libgloss/csky/crt0.S b/libgloss/csky/crt0.S
index a0651a734673..49f7da36478f 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-13 13:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-13 13:08 [newlib-cygwin/main] libgloss: csky: use atexit to call fini-array functions Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).