public inbox for newlib-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: newlib-cvs@sourceware.org Subject: [newlib-cygwin/main] libgloss: csky: use atexit to call fini-array functions. Date: Fri, 13 Jan 2023 13:08:48 +0000 (GMT) [thread overview] Message-ID: <20230113130848.71423385B515@sourceware.org> (raw) 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
reply other threads:[~2023-01-13 13:08 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230113130848.71423385B515@sourceware.org \ --to=corinna@sourceware.org \ --cc=newlib-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).