From patchwork Sat Aug 3 21:08:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 170513 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp2429809ile; Sat, 3 Aug 2019 14:09:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqyfY8Dx3BFja+ZqAMwhP6KRJPoU/3BRhXqiX7p4XR6A4w4q6qoHrVPuPBe4cXnCqWGdABse X-Received: by 2002:a17:906:19cc:: with SMTP id h12mr44375565ejd.304.1564866545267; Sat, 03 Aug 2019 14:09:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564866545; cv=none; d=google.com; s=arc-20160816; b=LQAnXUVXt/RyDUTJmrVwoJS8LsikEgqFePbo4nHE9m/0EkUR1VHxGARXiPmje+azo7 W7vUBJutALcsb6b8sGt+mnbiTv6+CLUhDeEHB7lhffy8MXbuJojx7IbsI4upIJgFQ731 0X1oC2gKCBuTuU/3/66ely1DC6hYd8NeJON1sMb7NFj81aRpHgptw9hfCe7Qe8nq08qt 4to3CbsCCY4PBH2MdsHXn8DDLVQbmNmMq7mxAUW2+w8Ujp3a1cdwyj/P5+sOt6oDj+zv Pbme0/UYiHsQjlXgJaopQJMKri4ONTuc65bzoH79xXB6sqSx2n7IIMH7zGfdK/elsmfv a24g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=bmpQuQaLO45/V21gwxDx+DwJ2G3aSCxmFjq9t4PMMQo=; b=RkWHIlIBfKcRCf/rS1/BKTRIyL8lVwQIwAEyCABPBrtVvq/MLQmlMmBgMMV3zhXOmg cvOdFwtr83+fxBga9dkzoG3bBEuHP6Fs3bnMgS80UkKYbojRk36aoTkl6mhOGGdFxbkR DovphneXa1VVyN9o1z6E9dbhpG5ZLTJUgCavRveoUR1r3l7EbWDCfxfr/SDdhIT+p5sp D7dIgWi5Fzm7NrmpHRsarUiEt4f0+9LB1NASx6M8u/NjZ/H+qz/aMB/UC/bLyHhJ61Cm 3ivr23XeNmANXT/7kYCRw5q0uHHn1Eo3c/W/jLvLs4edEumz66KJDsigQu7yWDCRTRJw ggUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="TbDJ/7Un"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s41si25989219edd.252.2019.08.03.14.09.05 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 03 Aug 2019 14:09:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="TbDJ/7Un"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hu1Gy-0001rI-9j for patch@linaro.org; Sat, 03 Aug 2019 17:09:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52017) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hu1GK-00013j-Ua for qemu-devel@nongnu.org; Sat, 03 Aug 2019 17:08:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hu1GJ-0005T1-Qw for qemu-devel@nongnu.org; Sat, 03 Aug 2019 17:08:24 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:42475) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hu1GH-0005Na-Qb for qemu-devel@nongnu.org; Sat, 03 Aug 2019 17:08:21 -0400 Received: by mail-pg1-x544.google.com with SMTP id t132so37748074pgb.9 for ; Sat, 03 Aug 2019 14:08:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bmpQuQaLO45/V21gwxDx+DwJ2G3aSCxmFjq9t4PMMQo=; b=TbDJ/7UnbJ5tKa+3jraWvw1FWaKuke5i8tZyS9pWJDDeQtApkyFVJM+SU6NDcd0JDS r702rKwzJRI0CPJ1dBDY8ZQaPev/ARW0VKWwSKRkxcXtz9kpTR1JwV2ms145AAcGqcBG fWymPRWy6iHEmfj3IK9leFrMGixXIx4peU61F0MUjJpO8ULjZUSQp8o1DXLEwHLivYOd h2QUK6aPr5w06YfjxkZokkRIljBuczwD3O/RaiaBPMbxOKjdJpzpHk1RAGsRlpIuwbat kuY+TzlwhC1H9k00Oqw2mF5Y5urGPdilkgtwrI7SobGrg7Ft0kP9YUlgg16XxY9tgA7H w1Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bmpQuQaLO45/V21gwxDx+DwJ2G3aSCxmFjq9t4PMMQo=; b=jPmQHqGiAaA7+fJVK+e5d6+DoesJAV2HaNO2iTcVjGPC/G7Z2/etFMWj9jyBXCbcDI AYeIGW2JuEqZtG0uUcJmWMkOCpVkKPIeSoR3/4XlP26/LxMrdmu3Q6cjwTzUwIovLasa 7gK+Di/FRw9r8tPeX+E/ptADRjjbmiEhqJpefiQcC4Db9SPI1GwK57CHiU4WYNt741fp w91b3Rr9yaQW40nJlzuct7mBscJKhDjTC6j2Rowfn+gxE3uS/DZ8lAMSN5Z6PXGWYreZ XHCttV9xGEimCl1le4r6mahXo3Pxjw80DLLGh8M7eLBvizPT6sh7uUyxCFRCej/bWiir uXqw== X-Gm-Message-State: APjAAAU7sf297wuwmQ6D53Qcn5Bui2rYkYuC4/2pKk+1s9qEeyzufgIe PtEW+F3oRRVScBI0XWVMP0Ictj42J4Y= X-Received: by 2002:a63:6947:: with SMTP id e68mr94509807pgc.60.1564866491659; Sat, 03 Aug 2019 14:08:11 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id x25sm110129644pfa.90.2019.08.03.14.08.10 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 03 Aug 2019 14:08:11 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 3 Aug 2019 14:08:01 -0700 Message-Id: <20190803210803.5701-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190803210803.5701-1-richard.henderson@linaro.org> References: <20190803210803.5701-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::544 Subject: [Qemu-devel] [PATCH v7 4/6] include/elf: Add defines related to GNU property notes for AArch64 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org, alex.bennee@linaro.org, Dave.Martin@arm.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" These are all of the defines required to parse GNU_PROPERTY_AARCH64_FEATURE_1_AND, copied from binutils. Other missing defines related to other GNU program headers and notes are elided for now. Signed-off-by: Richard Henderson --- include/elf.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) -- 2.17.1 Reviewed-by: Peter Maydell diff --git a/include/elf.h b/include/elf.h index 3501e0c8d0..7c4dc4b2cc 100644 --- a/include/elf.h +++ b/include/elf.h @@ -26,9 +26,13 @@ typedef int64_t Elf64_Sxword; #define PT_NOTE 4 #define PT_SHLIB 5 #define PT_PHDR 6 +#define PT_LOOS 0x60000000 +#define PT_HIOS 0x6fffffff #define PT_LOPROC 0x70000000 #define PT_HIPROC 0x7fffffff +#define PT_GNU_PROPERTY (PT_LOOS + 0x474e553) + #define PT_MIPS_REGINFO 0x70000000 #define PT_MIPS_RTPROC 0x70000001 #define PT_MIPS_OPTIONS 0x70000002 @@ -1651,6 +1655,24 @@ typedef struct elf64_shdr { #define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */ #define NT_ARM_SYSTEM_CALL 0x404 /* ARM system call number */ +/* Defined note types for GNU systems. */ + +#define NT_GNU_PROPERTY_TYPE_0 5 /* Program property */ + +/* Values used in GNU .note.gnu.property notes (NT_GNU_PROPERTY_TYPE_0). */ + +#define GNU_PROPERTY_STACK_SIZE 1 +#define GNU_PROPERTY_NO_COPY_ON_PROTECTED 2 + +#define GNU_PROPERTY_LOPROC 0xc0000000 +#define GNU_PROPERTY_HIPROC 0xdfffffff +#define GNU_PROPERTY_LOUSER 0xe0000000 +#define GNU_PROPERTY_HIUSER 0xffffffff + +#define GNU_PROPERTY_AARCH64_FEATURE_1_AND 0xc0000000 +#define GNU_PROPERTY_AARCH64_FEATURE_1_BTI (1u << 0) +#define GNU_PROPERTY_AARCH64_FEATURE_1_PAC (1u << 1) + /* * Physical entry point into the kernel. *