From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by sourceware.org (Postfix) with ESMTPS id D0EAF38708B1 for ; Tue, 15 Dec 2020 18:45:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D0EAF38708B1 Received: from noise.cbg.collabora.co.uk (unknown [IPv6:2001:4d48:ad5c:ef00:8e70:5aff:fe59:c29c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: vivek) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 69E091F45615 for ; Tue, 15 Dec 2020 18:45:08 +0000 (GMT) From: =?UTF-8?q?Vivek=20Das=C2=A0Mohapatra?= To: libc-alpha Subject: [RFC][PATCH v6 06/20] elf/dl-init.c: Skip proxied link map entries in the dl init path Date: Tue, 15 Dec 2020 18:44:46 +0000 Message-Id: <20201215184500.25915-7-vivek@collabora.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201215184500.25915-1-vivek@collabora.com> References: <20201215184500.25915-1-vivek@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Tue, 15 Dec 2020 18:45:14 -0000 Proxies should not trigger calls to DT_INIT constructors since they're just shims that point to the real, already loaded and initialised, objects. --- elf/dl-init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elf/dl-init.c b/elf/dl-init.c index 518824e8a5..11b00641a6 100644 --- a/elf/dl-init.c +++ b/elf/dl-init.c @@ -34,8 +34,8 @@ call_init (struct link_map *l, int argc, char **argv, char **env) need relocation, and neither do proxy objects.) */ assert (l->l_real->l_relocated || l->l_real->l_type == lt_executable); - if (l->l_init_called) - /* This object is all done. */ + if (l->l_init_called || l->l_proxy) + /* This object is all done, or a proxy (and therefore initless). */ return; /* Avoid handling this constructor again in case we have a circular -- 2.20.1