From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75862 invoked by alias); 19 Feb 2020 13:45:20 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 75827 invoked by uid 89); 19 Feb 2020 13:45:19 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1036, H*i:sk:df471f1, H*f:sk:df471f1 X-HELO: mail-ot1-f66.google.com Received: from mail-ot1-f66.google.com (HELO mail-ot1-f66.google.com) (209.85.210.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 19 Feb 2020 13:45:17 +0000 Received: by mail-ot1-f66.google.com with SMTP id w6so181892otk.0; Wed, 19 Feb 2020 05:45:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kM7aqBA0TfCauxxmi/B0aD3NWMFM41bW2YAFRuIilzU=; b=cq75c36QG/fdms5WxO3GQAEY/bekWOd92Z4ur1ZSyC/TjdoiEt/9yuT27+JeaKl0R6 JEilpkXEVSllTfsuOaG40mCyaWudNXyZmWay8AdB8tgD4ow7yUDKxbw7q2psefJGU+DQ BulZ6EORuH1HDodsBQr/dD5JAv13JTpLeo3RvX60ySTCGr91SapciYSMsC9ixYXfCYun igD6wpbb3dEJlMh+UeJM+2gWtgc3+iA/2UIebHvh3wVnDItYNLtZvFwEBCnkgL9ehiEB nJdw6DOKGzM8YqneYCe1Hn4DdLH4yM7brKYtK04YuJL/4CGxTOf0eOmMB+DZIkWcZkyq SXYA== MIME-Version: 1.0 References: <20200219023120.gvr4ajolbjbqcfix@google.com> <6bf04476b559f11965b4474b500156e26949ffc2.camel@klomp.org> In-Reply-To: From: "H.J. Lu" Date: Wed, 19 Feb 2020 13:45:00 -0000 Message-ID: Subject: Re: binutils ld and new PT_GNU_PROPERTY segment To: Mark Wielaard Cc: Fangrui Song , "Zhang, Annita" , gnu-gabi , Binutils Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg00464.txt.bz2 On Wed, Feb 19, 2020 at 5:17 AM Mark Wielaard wrote: > > On Wed, 2020-02-19 at 04:28 -0800, H.J. Lu wrote: > > On Wed, Feb 19, 2020 at 4:02 AM Mark Wielaard wrote: > > > > https://patchwork.kernel.org/patch/11285409/ > > > > > > > > It is for both x86 and arm64. > > > > > > So that is not upstream in the mainline kernel? Why can't that patch > > > use the existing PT_NOTE segment? That would make it compatible with > > > existing binaries that don't have this PT_GNU_PROPERTY program header. > > > > Kernel loader is one of motivations of PT_GNU_PROPERTY. Kernel loader > > only wants to check PT_XXX. > > So they can check PT_NOTE because it provides the same information and > is already available in existing binaries. > Please take a look at glibc note.gnu.property parser. It is very complicated to check for invalid .note.gnu.property sections generated by the older linkers with the new object. Kernel loader doesn't want to do it. -- H.J.