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: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 148C41F9E0 for ; Mon, 27 Apr 2020 18:07:51 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0861638708C5; Mon, 27 Apr 2020 18:07:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0861638708C5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1588010870; bh=T0HJpvPbejKUKfuJ/1nEuYzCzXHd7ivyGhmgKEk9iLs=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=oscG/3GIDRVKoGd+Fnf+G/kei3gl6NDIgCp0GqRF2NOEqg4EbrbxG3ZxCksG/y0RZ Y2DXPwEu2CSaXR/poouwCSwg/f/4bDeaSWCfSdlz2jp3PvUwafgPxGnOsrOVhL/E7g 6WegzvLFESIG5d+F85c3fCVtvoTwgMKwBYQ9HqiM= Received: from mail.efficios.com (mail.efficios.com [167.114.26.124]) by sourceware.org (Postfix) with ESMTPS id 8B94A3870855 for ; Mon, 27 Apr 2020 18:07:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8B94A3870855 Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 3AD5925BB48; Mon, 27 Apr 2020 14:07:46 -0400 (EDT) Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id slWzwd8sO-or; Mon, 27 Apr 2020 14:07:45 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id A036825BB47; Mon, 27 Apr 2020 14:07:45 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com A036825BB47 X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 7ZNHfZAlVIft; Mon, 27 Apr 2020 14:07:45 -0400 (EDT) Received: from localhost (unknown [192.222.236.144]) by mail.efficios.com (Postfix) with ESMTPSA id 7EADB25BC07; Mon, 27 Apr 2020 14:07:45 -0400 (EDT) Date: Mon, 27 Apr 2020 14:07:44 -0400 To: Florian Weimer Subject: Re: [PATCH] elf: Add initial flag argument to __libc_early_init Message-ID: <20200427180744.btytgboc6eeswaal@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) 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: Mathieu Desnoyers via Libc-alpha Reply-To: Mathieu Desnoyers Cc: libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" On 27-Apr-2020 12:31:21 PM, Florian Weimer wrote: [...] > diff --git a/elf/dl-open.c b/elf/dl-open.c > index ac7ab495e4..7bf1144e93 100644 > --- a/elf/dl-open.c > +++ b/elf/dl-open.c > @@ -748,9 +748,22 @@ dl_open_worker (void *a) > LIBC_PROBE (reloc_complete, 3, args->nsid, r, new); > > /* If libc.so was not there before, attempt to call its early > - initialization routine. */ > + initialization routine. Indicate to the initialization routine > + whether thie libc being initialized is the one in the base thie -> the > + namespace. */ > if (!args->libc_already_loaded) > - _dl_call_libc_early_init (GL(dl_ns)[args->nsid].libc_map); > + { > + struct link_map *libc_map = GL(dl_ns)[args->nsid].libc_map; > +#ifdef SHARED > + bool initial = libc_map->l_ns == LM_ID_BASE; > +#else > + /* In the static case, there is only one namespace, but it > + contains a secondary libc (the primary libc is statically > + linked). */ This comment seems misaligned. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com