From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 63401 invoked by alias); 24 Nov 2018 16:21:47 -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 63371 invoked by uid 89); 24 Nov 2018 16:21:47 -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.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=HTo:D*googlegroups.com, H*Ad:D*googlegroups.com, proposing X-Spam-Status: No, score=-2.9 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-ot1-f45.google.com Received: from mail-ot1-f45.google.com (HELO mail-ot1-f45.google.com) (209.85.210.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 24 Nov 2018 16:21:45 +0000 Received: by mail-ot1-f45.google.com with SMTP id 32so12988661ota.12; Sat, 24 Nov 2018 08:21:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=KbppjZN0+ca8Wjt/50KJHE7bZZPD3MFdyyf90ThTKaA=; b=VriMTH8cnzmnlJDvztrl+NeqzrMovEsvKDqXKqo2XlT7pSV1cxJ/cKtWWyt6hfypoh kHpCSq5gnsdCeDNlCnfkAathpXq/5TQYl4R/L1Tyu8+rUd/xhT0QfUf/HBEvuiGMARUf 0XSeHSFvSA45iEOWXT+fLLcdiSHx74PS0pKyjMt6Ar/To1ql2Ew8ALEPBlPK5JvmQh83 gXOiWPovl/mqg7vLMHwvn2Negf+bKOSfk6Hd1xJbPVegfDDhoWhgxXQ7KRGP56lyUQfD VsUavEmvXz0hleqSO1wv7D6htzJn7gtiQ0QbbBEXSoDpNCHxhdyxZk+5AfzIiyzcGDkz ANgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=KbppjZN0+ca8Wjt/50KJHE7bZZPD3MFdyyf90ThTKaA=; b=Z6W5fRwzWa6LGwQhNcft9CTSuSpMsY24eTaJnMQQfp+VEFIqoqU/ijLfvFSSGXJZ/h Ggxz/Np1jiW/lh/DHbBkuHeWfgpzsJ/KBy5yRGCqOgzRji9mFQCRNOlSVcTR6Up4BtLM X7ExztCd+bb/ptJKthWKQHq544lv4bBoIRjB2U92bIUgEG7jgf1BD79o/rzRVMBsQTS6 WPJoLXNliICZHQ24nB3rdbChuD5tfVtvwqeBYARmPTslp0EnusNi5iagk1p/XTt+Vdcz A654zhc+mRU2Tn1e5Sg7D4Zo+sEwMdqZqODs0uJo27h2WdHFkyiwWNV05Vg+9HJEnijJ 4p9g== X-Gm-Message-State: AA+aEWYVytdmFQorfd+d1RxXOUL1EBX8Fo+ZFbdTqaDNgCEzZPx6f7Pi O+C3JvkxQ2jlSseRjE3s5yUK8BaWi7vnKLOjt3VXjRS5 X-Google-Smtp-Source: AFSGD/Xz27VQD2CebZNQb4vkwa6Li6vpdpzLyG4CbE0IpzZkiORWbmFDkOehM51zZVEmKEXmgkwaP74GKo4Y/vsN88E= X-Received: by 2002:a9d:3646:: with SMTP id w64mr10660183otb.118.1543076503731; Sat, 24 Nov 2018 08:21:43 -0800 (PST) MIME-Version: 1.0 From: "H.J. Lu" Date: Mon, 01 Jan 2018 00:00:00 -0000 Message-ID: Subject: RFC: Linux gABI: Add a GNU_PROPERTY_BY_LINKER property To: 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/msg00017.txt.bz2 Linkers group input note sections with the same name into one output note section with the same name. One output note section is placed in one PT_NOTE segment. Linkers with GNU property support merge all input .note.gnu.property sections into one output .note.gnu.property section with a single NT_GNU_PROPERTY_TYPE_0 note in a single PT_NOTE segment. Since linkers without GNU property support treat input .note.gnu.property section as a generic note section and just concatenate all input .note.gnu.property sections into one output .note.gnu.property section without merging them, we may see one or more NT_GNU_PROPERTY_TYPE_0 notes in PT_NOTE segment, which is invalid. 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. 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. 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. -- H.J.