From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, PDS_RDNS_DYNAMIC_FP,RCVD_IN_DNSWL_HI,RDNS_DYNAMIC,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id E03FA1F61A for ; Mon, 12 Dec 2022 15:40:17 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="L5n1ZkrR"; dkim-atps=neutral Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D3BAF384F71B for ; Mon, 12 Dec 2022 15:40:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D3BAF384F71B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670859616; bh=1BBO9a1JR+5rAck74a+/cMfFb4seRk96rOczhD2uQ8s=; h=To:Cc:Subject:References:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=L5n1ZkrRcHuruI8dJWx0Xwbt/0MC8Zweqds5/2uyaGJwH6ugnzybbowgTNVbm65fk tQzfxuGyeCd2i+fPcXEm47l4i3lyNllz+m1uXK9tzlKBlZ4oxvXL37Nf510nsMKmAq wocIzbpYUEyjgm12nsl8hokU4l/NuYf7BEX7Eaag= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 03419384F735 for ; Mon, 12 Dec 2022 15:39:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 03419384F735 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-323-c_mONNu6P_q_nuafw_U2tQ-1; Mon, 12 Dec 2022 10:39:53 -0500 X-MC-Unique: c_mONNu6P_q_nuafw_U2tQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 21A7338173C7; Mon, 12 Dec 2022 15:39:53 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.81]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 82E99C15BA0; Mon, 12 Dec 2022 15:39:52 +0000 (UTC) To: Adhemerval Zanella Netto Cc: Adhemerval Zanella via Libc-alpha , Fangrui Song Subject: Re: [PATCH 4/7] Move libc_freeres_ptrs and libc_subfreeres to weak functions References: <20221115193159.173838-1-adhemerval.zanella@linaro.org> <20221115193159.173838-5-adhemerval.zanella@linaro.org> <874ju0ubs0.fsf@oldenburg.str.redhat.com> <87iligsone.fsf@oldenburg.str.redhat.com> <0c14b424-af63-a5ec-5545-ef79bd323058@linaro.org> Date: Mon, 12 Dec 2022 16:39:49 +0100 In-Reply-To: <0c14b424-af63-a5ec-5545-ef79bd323058@linaro.org> (Adhemerval Zanella Netto's message of "Mon, 12 Dec 2022 11:16:16 -0300") Message-ID: <87iligpr5m.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Florian Weimer via Libc-alpha Reply-To: Florian Weimer Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" * Adhemerval Zanella Netto: >> It has to be &ptr != NULL for the weak case, and you also need to create >> a weak alias. > > Right, and do we really need a weak_alias in this fact? Wouldn't weak_function > suffice in this case for !SHARED? weak_function is active for shared builds, and I don't think we want it there because it obscures bugs that would otherwise lead to link failures. Thanks, Florian