From patchwork Wed Jun 5 20:57:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 165926 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp7858941ili; Wed, 5 Jun 2019 14:03:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqyVdxirpZYEFmJpsIe6dTGIWt2p8piiySYUqgVtXmR+saLZuWynNz0Y9lQr7VOTHdbgKkzS X-Received: by 2002:a0c:888a:: with SMTP id 10mr10704841qvn.0.1559768633119; Wed, 05 Jun 2019 14:03:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559768633; cv=none; d=google.com; s=arc-20160816; b=qsIbYSOuxP8d3KUcnCcChVM8AHbe6nd4sKPwJTkFSQVXJLAi3kuLXJDHH91uPCChCJ DDmAJT4mEFhSpiMpsgxfmKWV459wH7Hh5IgNPOPxoTZgdd6eRvIhjGgRrZZ1lzpgsZTx 12PLZE7h35BgxyCmhy2qPAd2DwoEl5e24r0XIGepqCKNKZYPoJJwlwIadixum5Wu6Ub0 S1R8afyp6j7sQAq5lpQb8HDAb8c7hL9n7O+H1TbrVATtuuKVkPbBROCQQHKmN68+sgfy RHL2UKbdJdf2LeY/Og5lVB+PRLsgMHSIoHNsZ1auO/rBc5tYqWB4JEkoDlCx3p+ZMOeO btvw== 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=D6qDvZ2yUvasBaOhuVQfPLH+R2qFXowjyUNz4x5+OYc=; b=jMm/s3I+YIc98iv9BfNjf+cnHf/xUasMfU7023BKlv2l+q4i59yR3ukBYBEAmLKNyU DyUF+azx06rv4UcRo3gVDXwRxTow1O5IThmlbRJQ7Pozac2Rj/Rx2Xg8AIvioUd5h+BU BnEKURj5MW/CrInoQQ23MAV+fZy3M5In6toGceQs+n15k8CDppzbmGGTLwPnnh6xVXo4 o2EHKbJf+VIjvPn+43DqNHkErVnyT33Fjt9JSDxjzQVw7PatjdNiPrZdtFFt94Wajynk h5YYtcHU3sYEF8U5SXrSn/Uzi68soePl+iSyGP7fxZZWLd5HMUQE5Ia2NnhZDejPUhBV 2/Ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="J8pG3bM/"; 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 e7si5068828qtq.16.2019.06.05.14.03.52 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 05 Jun 2019 14:03:53 -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="J8pG3bM/"; 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 ([127.0.0.1]:49991 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYd4a-00031m-2M for patch@linaro.org; Wed, 05 Jun 2019 17:03:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYcyL-0006KN-3J for qemu-devel@nongnu.org; Wed, 05 Jun 2019 16:57:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hYcyH-00008m-Ik for qemu-devel@nongnu.org; Wed, 05 Jun 2019 16:57:23 -0400 Received: from mail-ot1-x343.google.com ([2607:f8b0:4864:20::343]:39336) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hYcyF-0008O5-Lg for qemu-devel@nongnu.org; Wed, 05 Jun 2019 16:57:19 -0400 Received: by mail-ot1-x343.google.com with SMTP id r21so2063880otq.6 for ; Wed, 05 Jun 2019 13:57:18 -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=D6qDvZ2yUvasBaOhuVQfPLH+R2qFXowjyUNz4x5+OYc=; b=J8pG3bM/LjB0cDoDlSI5UGePw0K1tCSNuNaoyOjXBz8CrSjK5paG3fYBqJdIU9EjZT 6I9JHV/67BUUsAVCVFl98PLGWRfYjn6WDXXPZ/gvFMnj3q2seoK9QlrAIr10B2c/SK5k fhLhKuLSX7URKzTIAtnEw1l4W7p+YNEH6WxnD9ZosvxIcVOHpJVzJFtwPd7NSi98brsJ 29YPxB5Uyuvum2L+DAsJZaKkx6ezoz0kNfPUWZ21HyMFWsAGNc/GJEcqCFxKbxZj5RfE 1BwcKaCDhKf+WCMlHcDcTBe1Z2jGk4lZi5R0JKc6e+xUZYEr9suK8S8QO1yEbeBF28g4 mn7Q== 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=D6qDvZ2yUvasBaOhuVQfPLH+R2qFXowjyUNz4x5+OYc=; b=UZsWee8412HLjHPup9LQFrikuR7Tf2L4xIVHnkf8rDDCkDGBjM1rzj8/cX6NSOvKy0 LBmkASCADG5Hw7gsWc9dnSJYqicDQ1MIv3vEXKnwimseSHE1sV4zsENFTDt/lT6lM94j wWQuPTFl2Tmy7ZvdZMt8Q5GyR1NX2IMeqcTuAVl3juEiRWSpChby7cNMRZZiily2KLkc GUznKYjxVH6wQ4VqpsvCkFjKP3jcEOfjw+5AAE9Wtc88o+/LpGVEJ0NSoD6HKZMhbJuw lmCK8EFCQKV0rFDqjHtuzOlShEC+BjCT3+lRVzkNhgAHsYb+JUJ3zRiz9wKnKcgamYgO tH3g== X-Gm-Message-State: APjAAAW2Vrf5kdnWFGbbm6VXXz7JwN/NHpw9vPgma2VR4fJVNEyesO/e 5+U2XAr9EZHWuvdN6dw7eWO+a9NWzWZ4qA== X-Received: by 2002:a05:6830:1698:: with SMTP id k24mr6033344otr.323.1559768237896; Wed, 05 Jun 2019 13:57:17 -0700 (PDT) Received: from localhost.localdomain (200-56-192-86-cable.cybercable.net.mx. [200.56.192.86]) by smtp.gmail.com with ESMTPSA id f5sm7414155otl.51.2019.06.05.13.57.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jun 2019 13:57:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 5 Jun 2019 15:57:04 -0500 Message-Id: <20190605205706.569-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190605205706.569-1-richard.henderson@linaro.org> References: <20190605205706.569-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::343 Subject: [Qemu-devel] [PATCH v6 4/6] include/elf: Add defines related to notes for GNU systems X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org, Dave.Martin@arm.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This is a collection of related defines for notes, copied from glibc's . We're not going to use all of these right away, but it seemed foolish to cherry-pick only the ones we need now. Signed-off-by: Richard Henderson --- include/elf.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) -- 2.17.1 diff --git a/include/elf.h b/include/elf.h index ea7708a4ea..6f3eada36f 100644 --- a/include/elf.h +++ b/include/elf.h @@ -1650,6 +1650,54 @@ 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_ABI_TAG 1 /* ABI information */ +#define NT_GNU_HWCAP 2 /* Synthetic hwcap information */ +#define NT_GNU_BUILD_ID 3 /* Build ID */ +#define NT_GNU_GOLD_VERSION 4 /* Version of ld.gold */ +#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_X86_ISA_1_USED 0xc0000000 +#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0000001 + +#define GNU_PROPERTY_X86_ISA_1_486 (1U << 0) +#define GNU_PROPERTY_X86_ISA_1_586 (1U << 1) +#define GNU_PROPERTY_X86_ISA_1_686 (1U << 2) +#define GNU_PROPERTY_X86_ISA_1_SSE (1U << 3) +#define GNU_PROPERTY_X86_ISA_1_SSE2 (1U << 4) +#define GNU_PROPERTY_X86_ISA_1_SSE3 (1U << 5) +#define GNU_PROPERTY_X86_ISA_1_SSSE3 (1U << 6) +#define GNU_PROPERTY_X86_ISA_1_SSE4_1 (1U << 7) +#define GNU_PROPERTY_X86_ISA_1_SSE4_2 (1U << 8) +#define GNU_PROPERTY_X86_ISA_1_AVX (1U << 9) +#define GNU_PROPERTY_X86_ISA_1_AVX2 (1U << 10) +#define GNU_PROPERTY_X86_ISA_1_AVX512F (1U << 11) +#define GNU_PROPERTY_X86_ISA_1_AVX512CD (1U << 12) +#define GNU_PROPERTY_X86_ISA_1_AVX512ER (1U << 13) +#define GNU_PROPERTY_X86_ISA_1_AVX512PF (1U << 14) +#define GNU_PROPERTY_X86_ISA_1_AVX512VL (1U << 15) +#define GNU_PROPERTY_X86_ISA_1_AVX512DQ (1U << 16) +#define GNU_PROPERTY_X86_ISA_1_AVX512BW (1U << 17) + +#define GNU_PROPERTY_X86_FEATURE_1_AND 0xc0000002 +#define GNU_PROPERTY_X86_FEATURE_1_IBT (1U << 0) +#define GNU_PROPERTY_X86_FEATURE_1_SHSTK (1U << 1) + +#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. *