From patchwork Wed Jun 6 18:19:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Dasmohapatra X-Patchwork-Id: 27675 Received: (qmail 85301 invoked by alias); 6 Jun 2018 18:28:35 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 84800 invoked by uid 89); 6 Jun 2018 18:28:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:902 X-HELO: bhuna.collabora.co.uk From: =?UTF-8?q?Vivek=20Das=C2=A0Mohapatra?= To: libc-alpha@sourceware.org Subject: [RFC][PATCH v2 6/6] elf/dl-init.c: Skip proxied link map entries in the dl init path Date: Wed, 6 Jun 2018 18:19:34 +0000 Message-Id: <20180606181934.2480-7-vivek@collabora.com> In-Reply-To: <20180606181934.2480-1-vivek@collabora.com> References: <20180606181934.2480-1-vivek@collabora.com> 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 3e72fa3013..2533afa042 100644 --- a/elf/dl-init.c +++ b/elf/dl-init.c @@ -27,8 +27,8 @@ typedef void (*init_t) (int, char **, char **); static void call_init (struct link_map *l, int argc, char **argv, char **env) { - 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