From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) by sourceware.org (Postfix) with ESMTPS id 856F738AA240 for ; Tue, 15 Nov 2022 19:32:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 856F738AA240 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oi1-x235.google.com with SMTP id t62so15918115oib.12 for ; Tue, 15 Nov 2022 11:32:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=IyRmB5hBqi5mJL0WIdBMoMMljDU1Z5lE/PJtpVqWItI=; b=YBpcQpI89sZAC3HL3w91TDzRgAg/+qr4kEPlPMS/B5EYzdvQ1dbOKcxqtldUp0U/b9 fB3ZQUD01pObb5v9Gwq9QptWU+g+zZ6oHr3LCv0FyeXDdzajuhF11CMQa0uj8i+TPUCl w/ARYO26cfTqOkKREuLiP1xP0w6580wOFSu5sPVu+FazV4uqq28mrgkAvpqDPeUw8gOH TU3YEv303Jw3+z4hBUk32nzymj4ccJ1nlo0iBsAgUOCFTCrOI7JhBM2OwNWDnGNSnbeb mElqdbjaZGY0UyvL2pGhX6bsikssHUkYpPaQvBsEr0bsgSMXC5UCz94U1CC8RZs5wluV mFTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IyRmB5hBqi5mJL0WIdBMoMMljDU1Z5lE/PJtpVqWItI=; b=wVvqjZKCYq4NIhUUYsrm1kRPRNpXyW0gpV7TnitOJs1XWph6qWmoP7kBr7BIGo9qD4 Bl62L6LwQLnHU50L5QKRYpoyRGzxYG6OIYPVxdkBvTL9zrYQY1MQUvd7+vzu48tS/CJv ABWx8DLZJuVrO0elV0RpYe02td8UlyXS5FGU0yC/gNgJ46NT2jw5ErHLy9zC8EtNBKxI ikwr0T86DYK2FVLovs9VT6r9eNFHQ3vF2tVJ1qMGTZuVtPDjl0dWL1gpzeE73sM86Lou k5Ut28SenTIWF4MMlD6vkEQOGh1MYwK23JJ1z4XxNKwaxIqDh7lMcB3wIYVq5AD7Qext +Uqw== X-Gm-Message-State: ANoB5pnvZakEe+KWxMPOrK6L9nH1WstE+Ldl34HP3L96KThElwTt3jrn b8D70F0JANZs4GsuLFHT6t0BE+r0bZW+gGsV X-Google-Smtp-Source: AA0mqf6s2du9ZMCpaWVzKxUE19k69MUeo8imHS4jyqrpMEXiiL0msyr8zHWkdVojuzvIt+4BuC/4Qw== X-Received: by 2002:a05:6808:15a8:b0:354:b824:b599 with SMTP id t40-20020a05680815a800b00354b824b599mr1114434oiw.176.1668540727714; Tue, 15 Nov 2022 11:32:07 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c1:1164:573d:c7d8:ae8e:e2eb]) by smtp.gmail.com with ESMTPSA id f7-20020a9d2c07000000b00660e833baddsm5705231otb.29.2022.11.15.11.32.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Nov 2022 11:32:07 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org, Fangrui Song Subject: [PATCH 3/7] stdlib: Move _IO_cleanup to call_function_static_weak Date: Tue, 15 Nov 2022 16:31:55 -0300 Message-Id: <20221115193159.173838-4-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221115193159.173838-1-adhemerval.zanella@linaro.org> References: <20221115193159.173838-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --- 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 #include #include +#include #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