From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org, Fangrui Song <maskray@google.com>
Subject: [PATCH 3/7] stdlib: Move _IO_cleanup to call_function_static_weak
Date: Tue, 15 Nov 2022 16:31:55 -0300 [thread overview]
Message-ID: <20221115193159.173838-4-adhemerval.zanella@linaro.org> (raw)
In-Reply-To: <20221115193159.173838-1-adhemerval.zanella@linaro.org>
---
Makerules | 3 ---
libio/genops.c | 2 --
stdlib/exit.c | 6 ++----
3 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/Makerules b/Makerules
index a41491429e..3226b7a12b 100644
--- a/Makerules
+++ b/Makerules
@@ -568,9 +568,6 @@ $(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules
PROVIDE(__start___libc_subfreeres = .);\
__libc_subfreeres : { *(__libc_subfreeres) }\
PROVIDE(__stop___libc_subfreeres = .);\
- PROVIDE(__start___libc_atexit = .);\
- __libc_atexit : { *(__libc_atexit) }\
- PROVIDE(__stop___libc_atexit = .);\
PROVIDE(__start___libc_IO_vtables = .);\
__libc_IO_vtables : { *(__libc_IO_vtables) }\
PROVIDE(__stop___libc_IO_vtables = .);\
diff --git a/libio/genops.c b/libio/genops.c
index 1b629eb695..8a7fc4f7c5 100644
--- a/libio/genops.c
+++ b/libio/genops.c
@@ -1115,5 +1115,3 @@ _IO_list_resetlock (void)
#endif
}
libc_hidden_def (_IO_list_resetlock)
-
-text_set_element(__libc_atexit, _IO_cleanup);
diff --git a/stdlib/exit.c b/stdlib/exit.c
index 10c44e1449..98579fbda8 100644
--- a/stdlib/exit.c
+++ b/stdlib/exit.c
@@ -20,11 +20,9 @@
#include <unistd.h>
#include <pointer_guard.h>
#include <libc-lock.h>
+#include <libio/libioP.h>
#include "exit.h"
-#include "set-hooks.h"
-DEFINE_HOOK (__libc_atexit, (void))
-
/* Initialize the flag that indicates exit function processing
is complete. See concurrency notes in stdlib/exit.h where
__exit_funcs_lock is declared. */
@@ -128,7 +126,7 @@ __run_exit_handlers (int status, struct exit_function_list **listp,
__libc_lock_unlock (__exit_funcs_lock);
if (run_list_atexit)
- RUN_HOOK (__libc_atexit, ());
+ call_function_static_weak (_IO_cleanup);
_exit (status);
}
--
2.34.1
next prev parent reply other threads:[~2022-11-15 19:32 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-15 19:31 [PATCH 0/7] Fixing remaining lld issues Adhemerval Zanella
2022-11-15 19:31 ` [PATCH 1/7] configure: Move locale tools early Adhemerval Zanella
2022-11-15 19:31 ` [PATCH 2/7] elf: Do not assume symbol order on tst-audit25{a,b} Adhemerval Zanella
2022-12-12 12:36 ` Adhemerval Zanella Netto
2022-11-15 19:31 ` Adhemerval Zanella [this message]
2022-12-12 10:52 ` [PATCH 3/7] stdlib: Move _IO_cleanup to call_function_static_weak Florian Weimer
2022-12-13 16:52 ` Joseph Myers
2022-11-15 19:31 ` [PATCH 4/7] Move libc_freeres_ptrs and libc_subfreeres to weak functions Adhemerval Zanella
2022-12-12 10:55 ` Florian Weimer
2022-12-12 13:14 ` Adhemerval Zanella Netto
2022-12-12 10:58 ` Florian Weimer
2022-12-12 13:16 ` Adhemerval Zanella Netto
2022-12-12 11:00 ` Florian Weimer
2022-12-12 13:49 ` Adhemerval Zanella Netto
2022-12-12 14:05 ` Florian Weimer
2022-12-12 14:16 ` Adhemerval Zanella Netto
2022-12-12 15:39 ` Florian Weimer
2022-12-12 11:05 ` Andreas Schwab
2022-12-12 13:49 ` Adhemerval Zanella Netto
2022-12-12 11:08 ` Florian Weimer
2022-12-12 13:51 ` Adhemerval Zanella Netto
2022-11-15 19:31 ` [PATCH 5/7] libio: Remove the usage of __libc_IO_vtables Adhemerval Zanella
2022-12-12 11:40 ` Florian Weimer
2022-11-15 19:31 ` [PATCH 6/7] Remove --with-default-link configure option Adhemerval Zanella
2022-11-15 19:31 ` [PATCH 7/7] Remove set-hooks.h from generic includes Adhemerval Zanella
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=20221115193159.173838-4-adhemerval.zanella@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=libc-alpha@sourceware.org \
--cc=maskray@google.com \
/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: link
Be 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).