From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) by sourceware.org (Postfix) with ESMTPS id 252E138708F4 for ; Sat, 16 May 2020 18:02:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 252E138708F4 Received: by mail-il1-x144.google.com with SMTP id n11so5845559ilj.4 for ; Sat, 16 May 2020 11:02:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fO9MaN0VmTsqFXB2+2b3rlk1eQb4+atP0vsMKXmzrLo=; b=A3eMs0afbHwH/TaKDK8iZrjkspXfaQMUCo9JbBDEgR/JCFkFMMqrXgko6z6kNa6EcF 4NPUNnnow+dPzbmQdXhBqs403ViitVgBkS19MNqf1jfJN9dvasUC3BCNyy7oFL4uG7OT C87oKM2702S5vn561MuY2Y4j/Lsw3BXb9t/+BwpwmO+72RMdLRCoxpT4IW4IoKxlIREj 8zXdETaLjubK4jXksXPFPO/tejoL87TOSp5J43ArVdHK9xcKzL8PIa1dUIkWmGy910EW SslZuMSwCt+/fI0Djk43F3ilbqhS0pBbKLsumOVWOCEsXBgMaBFBqY7ED6ULLUJGZG2D S3JA== X-Gm-Message-State: AOAM533RvQhWMUHW32Tm87XWLYyq/TPn4eLtKSWUVAwvr6pi8LPzsFmY 350LYF07+sR/5MvHS8WrjXKL25vVsHoK6ra442NOL0c8 X-Google-Smtp-Source: ABdhPJyv6zMgYXM/VXtRe8XmWHq381309rkAJkMaC1AQsGPr26wK+cyFIrI63+FKi2P/Srrbfj5e3H2fFoWxjKnWmus= X-Received: by 2002:a92:d591:: with SMTP id a17mr9474026iln.13.1589652139603; Sat, 16 May 2020 11:02:19 -0700 (PDT) MIME-Version: 1.0 References: <20200428215243.236312-1-hjl.tools@gmail.com> <20200428215243.236312-3-hjl.tools@gmail.com> <87wo5bn4xw.fsf@mid.deneb.enyo.de> In-Reply-To: <87wo5bn4xw.fsf@mid.deneb.enyo.de> From: "H.J. Lu" Date: Sat, 16 May 2020 11:01:43 -0700 Message-ID: Subject: Re: [PATCH 2/3] rtld: Get architecture specific initializer in rtld_global To: Florian Weimer Cc: "H.J. Lu via Libc-alpha" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, 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: Sat, 16 May 2020 18:02:21 -0000 On Sat, May 16, 2020 at 10:52 AM Florian Weimer wrote: > > * H. J. Lu via Libc-alpha: > > > Include to get architecture specific initializer in > > rtld_global. > > --- > > elf/rtld.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/elf/rtld.c b/elf/rtld.c > > index 0016db86a7..44b9fb0b3c 100644 > > --- a/elf/rtld.c > > +++ b/elf/rtld.c > > @@ -315,6 +315,8 @@ rtld_hidden_def (_dl_starting_up) > > (except those which cannot be added for some reason). */ > > struct rtld_global _rtld_global = > > { > > + /* Get architecture specific initializer. */ > > +#include > > /* Generally the default presumption without further information is an > > * executable stack but this is not true for all platforms. */ > > ._dl_stack_flags = DEFAULT_STACK_PERMS, > > This patch does not build on its own. I'm surprised that it works in > combination with the third patch. It should build. > Is _rtld_global really the right place for this data? Is it even > needed from outside the dynamic loader? Yes, it matches: struct rtld_global { ... #include ... }; in sysdeps/generic/ldsodefs.h. -- H.J.