From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94032 invoked by alias); 26 Nov 2018 13:12:49 -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 93991 invoked by uid 89); 26 Nov 2018 13:12:49 -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=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=surely, notes, H*Ad:D*googlegroups.com, H*i:sk:CAMe9rO X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=no 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: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 26 Nov 2018 13:12:44 +0000 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 333423084036; Mon, 26 Nov 2018 13:12:43 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-117-248.ams2.redhat.com [10.36.117.248]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 09420101E5A5; Mon, 26 Nov 2018 13:12:41 +0000 (UTC) From: Florian Weimer To: "H.J. Lu" Cc: Binutils , GNU C Library , gnu-gabi@sourceware.org, x86-64-abi@googlegroups.com Subject: Re: RFC: Linux gABI: Add a GNU_PROPERTY_BY_LINKER property References: Date: Mon, 01 Jan 2018 00:00:00 -0000 In-Reply-To: (H. J. Lu's message of "Sat, 24 Nov 2018 08:21:07 -0800") Message-ID: <87ftvoouda.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Mon, 26 Nov 2018 13:12:43 +0000 (UTC) X-IsSubscribed: yes X-SW-Source: 2018-q4/txt/msg00018.txt.bz2 * 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? > 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.) Thanks, Florian