Message ID | 20210209171839.7911-7-vivek@collabora.com |
---|---|
State | Superseded |
Delegated to: | Adhemerval Zanella Netto |
Headers |
Return-Path: <libc-alpha-bounces@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EFA8F398B869; Tue, 9 Feb 2021 17:18:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EFA8F398B869 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1612891134; bh=EujnfapYl6fhiCudey5ASrrqxOHRriSrpeCBVTqSGJ0=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=w+VZk2uV88nDhOhxUiBhCnth4Jn6gLnopoXhQKr5a0Kwu7QP9l5TYaQcuoTNIr1nH CF09BBJa9KnFxQ8E+WBNAoWYk9ntzMojPkuqoxjZ7VTHUUE1wed/39+JOsQR/x1mOf 2A3hHeYb+XvaVOpEaViAa1N40cw+ryx/Jg8O6xHw= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by sourceware.org (Postfix) with ESMTPS id 048B83850438 for <libc-alpha@sourceware.org>; Tue, 9 Feb 2021 17:18:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 048B83850438 Received: from noise.lan (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 20E0E1F451DA for <libc-alpha@sourceware.org>; Tue, 9 Feb 2021 17:18:46 +0000 (GMT) To: libc-alpha@sourceware.org Subject: [RFC][PATCH v8 06/20] elf/dl-init.c: Skip proxied link map entries in the dl init path Date: Tue, 9 Feb 2021 17:18:25 +0000 Message-Id: <20210209171839.7911-7-vivek@collabora.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210209171839.7911-1-vivek@collabora.com> References: <20210209171839.7911-1-vivek@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.5 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 <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: =?utf-8?q?Vivek_Das=C2=A0Mohapatra_via_Libc-alpha?= <libc-alpha@sourceware.org> Reply-To: =?utf-8?q?Vivek_Das=C2=A0Mohapatra?= <vivek@collabora.com> Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces@sourceware.org> |
Series |
Implementation of RTLD_SHARED for dlmopen
|
|
Commit Message
Vivek Dasmohapatra
Feb. 9, 2021, 5:18 p.m. UTC
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(-)
Comments
On 09/02/2021 14:18, Vivek Das Mohapatra via Libc-alpha wrote: > 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 b7e4b8a3af..a0183aa315 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 > Ok.
diff --git a/elf/dl-init.c b/elf/dl-init.c index b7e4b8a3af..a0183aa315 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