From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 86097 invoked by alias); 26 Nov 2018 13:41:05 -0000 Mailing-List: contact gnu-gabi-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: gnu-gabi-owner@sourceware.org Received: (qmail 86065 invoked by uid 89); 26 Nov 2018 13:41:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=surely, notes, H*Ad:D*googlegroups.com, pt_ X-Spam-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-Spam-User: qpsmtpd, 3 recipients X-HELO: mail-oi1-f178.google.com Received: from mail-oi1-f178.google.com (HELO mail-oi1-f178.google.com) (209.85.167.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 26 Nov 2018 13:41:03 +0000 Received: by mail-oi1-f178.google.com with SMTP id y23so15806851oia.4; Mon, 26 Nov 2018 05:41:03 -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=x4Enbv3wm90Xf36OXD5n9BdrNGjXn3yBxZSoMNdVicg=; b=JIsAj6UE/hEb90/USQjJXMfx2yGyyt3dk4o5c+k1dQRSp10IMO5Z4QBxWO2NzkLahY 59E9b3wbv0994VEhG+qc0WOPB1LzZSu8MDguXlgeBKDBxPQl5SfMcasqw112aMh9ZH+7 6vjfFxUdBNQHOGYl3GGmqM7Ao9l21hQ6SgZ6oKbYGT69tuzbgf4EFUPPLRSXg+kQkwSA ihuU9J40d8rbV0A4ohGCsgn1P5Y8VR61fcnnVsXA5k+x5P1QnxzK6kdR7wl9K9npPRtt n+WtEfUc4i70FSi2j0yfyJB9IIpNeks2LF033+54V3uvNBosQ7mEhcsCsgNh9bs+9i0q RqKQ== 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=x4Enbv3wm90Xf36OXD5n9BdrNGjXn3yBxZSoMNdVicg=; b=QMCmQKMZMTFHGBur4BnwTbZC+ipn8/Dgk8qXf1AXW40H16REB3VX5tW28bB0Ieg8za PRqufPXhLUKC8QMEaLC7f4CCfnI21O37poyYl7WR1fBXgEGmERZW6Kkt2a0gQ5NbFpkF SPwRDOqg6clDHihFb+IJVj3fWpOrOYoyiobWGeMZAc25SQSnz2fPuB8KhyEiXL7ac8n+ v2UqU1Ai7Z9feZ5M/OSU4AyaD5cjdwYsyh71Gux3sfybH3xnEMc2rghP6JUkLtsWZLH0 FX0CZ8N0d6CAX+LAwM2uVZUAR8nR9FkfdDghHwn0qbloa4Mox8eujHCHD2uLDxcO0x5u Mfbg== X-Gm-Message-State: AGRZ1gL0gcDofUTIbj1AfEthLS6XUuA9nGvMmTGYJUq/ZwE5PRfSBPBf ZMpqHbVzlxv8tOdUyNO21olFsT1FNnIpmw23ANw= X-Google-Smtp-Source: AJdET5eXp5DVeaw5btSkss2I15wrrpqG0CtV/qZ0ty0igZ1sIPVfm1gS3Jizi4uQC1F0nbFUoZURWGdE06NeA/6ognY= X-Received: by 2002:aca:50cf:: with SMTP id e198mr16057397oib.343.1543239660342; Mon, 26 Nov 2018 05:41:00 -0800 (PST) MIME-Version: 1.0 References: <87ftvoouda.fsf@oldenburg.str.redhat.com> In-Reply-To: <87ftvoouda.fsf@oldenburg.str.redhat.com> From: "H.J. Lu" Date: Mon, 01 Jan 2018 00:00:00 -0000 Message-ID: Subject: Re: RFC: Linux gABI: Add a GNU_PROPERTY_BY_LINKER property To: Florian Weimer Cc: Binutils , GNU C Library , gnu-gabi@sourceware.org, x86-64-abi@googlegroups.com Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-q4/txt/msg00019.txt.bz2 On Mon, Nov 26, 2018 at 5:12 AM Florian Weimer wrote: > > * H. J. Lu: > > > GNU_PROPERTY_X86_UINT32_VALID was defined to address this issue such that > > linker sets the bit in values of x86 properties for non-relocatable > > outputs. But it isn't sufficient: > > > > 1. It doesn't cover generic properties. > > Okay. > > > 2. When -mx86-used-note=yes is passed to x86 assembler, the > > GNU_PROPERTY_X86_UINT32_VALID bit is set in GNU_PROPERTY_X86_ISA_1_USED > > property in object file and linkers without GNU property support generate > > invalid NT_GNU_PROPERTY_TYPE_0 notes with the GNU_PROPERTY_X86_UINT32_VALID > > bit set. > > Surely this is a GAS bug? Why not fix that bug? Linker removes GNU_PROPERTY_X86_ISA_1_USED when its value is empty. Maybe linker shouldn't do that. > > I am proposing the following changes: > > > > 1. Add a GNU_PROPERTY_BY_LINKER property which should only be set by > > linker for non-relocatable outputs to indicate the property note is > > valid and generated by new linkers. Loaders can check this property > > to verify that the property note is valid. > > 2. Remove GNU_PROPERTY_X86_UINT32_VALID. > > 3. Define GNU_PROPERTY_X86_ISA_1_BASE for GNU_PROPERTY_X86_ISA_1_USED, > > which has the same bit as GNU_PROPERTY_X86_UINT32_VALID and use it > > for -mx86-used-note=yes with x86 assembler. > > The alternative approach would be to switch to a new PT_ segment for > this because those aren't included in relocatable objects. (Maybe it's > time for another approach.) PT_NOTE is used so that binaries with GNU properties are backward compatible with loaders which don't support GNU properties. They will run without any new features from GNU properties. -- H.J.