From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-xc2b.google.com (mail-oo1-xc2b.google.com [IPv6:2607:f8b0:4864:20::c2b]) by sourceware.org (Postfix) with ESMTPS id CCAC8385842C for ; Sun, 27 Feb 2022 19:57:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CCAC8385842C Received: by mail-oo1-xc2b.google.com with SMTP id j7-20020a4ad6c7000000b0031c690e4123so15781974oot.11 for ; Sun, 27 Feb 2022 11:57:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :content-language:to:from:subject:content-transfer-encoding; bh=m/h5uDZQomdkmsmc3ScZ54osCmUavPJRt/oWw937PjQ=; b=Ool0UPPbfhgAKFqaEZv003UfhE1ra6laqXOwNcRF3hmEoukxWORgZmxN12JNzfIXBO ZzVuI9Ny5siRJSzCqyKRH0rMm09EoxnsP/JPOq2cYiHYrmpr5lBB69pA1Pt011tQQrTx v9w9YLNwfmE1dMLtpayXZldnBgiM7UL+kDmqw/B1Rsh5feHYoeYZKiHvs+M8HMuGbapp PmordvijgscgOUMvZPVV0LwTXLHbTw+1k3wSjsqVPC7ns/BRY76aq4fBklzdh1dJrFSV TBv87SrS8NQBdJqyTVgy1QVk85LXbhd9e+n4yfVI+jfCKuCmAId4ZNWFpinq1gY1FJOb APgg== X-Gm-Message-State: AOAM533aKgrQ9FB6i3nLY938rTMy5wOTRGbxYDU6Pe4afAOgYHo5WPWP Q+9LHlgLSm9+o24B/to4KtMIsOj4qxk= X-Google-Smtp-Source: ABdhPJxERwu/QcGTwtgImp95TMHFQuIJEUePx25A5NHngQizPqHmgQwBrjzGnO0dOLhjcTALRFfGJQ== X-Received: by 2002:a4a:9749:0:b0:2da:d983:8641 with SMTP id v9-20020a4a9749000000b002dad9838641mr7349970ooi.0.1645991879225; Sun, 27 Feb 2022 11:57:59 -0800 (PST) Received: from ?IPV6:2804:431:cfcd:eaf9::536f:6e69? ([2804:431:cfcd:eaf9::536f:6e69]) by smtp.googlemail.com with ESMTPSA id f21-20020a4ada55000000b0031c16df28f9sm3866118oou.42.2022.02.27.11.57.58 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 11:57:58 -0800 (PST) Sender: "Soni L." Message-ID: <5e390a65-bcfc-5924-cd49-39222d640165@gmail.com> Date: Sun, 27 Feb 2022 16:57:56 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Content-Language: en-US To: Libc-help From: "Soni L." Subject: The case for statically linked libc/pthread Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Feb 2022 19:58:01 -0000 It'd be nice if the kernel could keep track of which code segments allocated memory or spawned threads, so that dlclose can release those resources. In fact this is particularly important for correctness in dlclose. But that requires libc to be statically linked in the first place. There's no hope for dlclose without statically linked libc.