From patchwork Wed May 20 17:27:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 186997 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp818353ilb; Wed, 20 May 2020 10:29:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwXXDlElwmt8pECzoTKNLjV8BvQWcaTQVabb7XBMvjwra6S5zPuZcDuyczRRB/FMoyF/lt X-Received: by 2002:aed:3fe8:: with SMTP id w37mr6217961qth.335.1589995782746; Wed, 20 May 2020 10:29:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589995782; cv=none; d=google.com; s=arc-20160816; b=kF6359IRKt4uSdXSlHTlpTKGEwKjUmSwew1ybZJzht19vo2M1UKKq9CuKEHZLyxIrr 0FhZe3Rt+4Y5JpgEG770WmBH/Q1VNb6RnpChtx3TUKU+bTTjRvS0eix3s75TNcU8QoMN hbOXM5D+hUrI1OMKQGITV9KJzEVdr9A1YvNbOz5nIBISR4/ibJRkyc8pjIBUbnu5bsHh +3NEdK49o4yNikwLRalLcWw6Pi6P4T3LmFRhYqj8Yb0BbZW37EbK8uqxr/ik8dE7D50A PedV9UzBTuzJNesyqJmxl+rHGbnMkneQtPw9UEJLkMMgx0B0rY79r+Be030Iyv4JqC/n a1Gg== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=pfOqd0W163btym5ANgJ/IhyJiwPH1qS8Yj0O7sKwHiQ=; b=GqVXiBA+9686Pg3nXBXmu1fcVLxa8IsxY/hxPZMBiRKfb2dVuZ+KBH+cGe1CPDRMMz z89NNijyrWTATV2c4PLJjZtpvMTZ1e21WqgAgfV2CQyHEaD5C73g5xc34vfctNvP5G+J hVrLJeh9+9qFlk7mnKfVwWbIuvn3I63UzpynTIWeiSfmYcg/PHHTq8Piogmp5KTemk/g OaOS6o4As/pUZ9Znyrd2v1WKwrrOzk2Mtz0BkEqyqxLT4J+HRua1IXmYzrwMW5Nmlgq2 fqlMwPztBRfx9bNKpjGMXGVMlRwydeiN3DOpZLODLngJIUOoTof3vpmybs+BiSZOTGcp 0XnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LTlYbEmG; 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=pass (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 r10si1928658qvl.213.2020.05.20.10.29.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 May 2020 10:29:42 -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=pass header.i=@linaro.org header.s=google header.b=LTlYbEmG; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:40012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbSXG-0004a9-8e for patch@linaro.org; Wed, 20 May 2020 13:29:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53564) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbSVl-0001mP-Ts for qemu-devel@nongnu.org; Wed, 20 May 2020 13:28:09 -0400 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]:33044) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbSVj-0004JP-Vz for qemu-devel@nongnu.org; Wed, 20 May 2020 13:28:09 -0400 Received: by mail-pj1-x1042.google.com with SMTP id z15so195646pjb.0 for ; Wed, 20 May 2020 10:28:07 -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 :mime-version:content-transfer-encoding; bh=pfOqd0W163btym5ANgJ/IhyJiwPH1qS8Yj0O7sKwHiQ=; b=LTlYbEmG0y9w9EEj+w6hceCghY+eIDoYDGfg/JlUnckhcOWWR4vb//edfXBLsAX4H6 MbWFzGQ1tK6iH7pLANWBKicrx4+sGRToe6CcND+eAt//xL5pC3Yim6blMXn8nEhdI1sb QAhiM29FPK80xRqpS9U8vIlWAzDBLdpw3IWpiCgEujQVDIKSLt5m16lNZIgOO/6EfFh+ iLEn/UuTIEDUdmlnwu9CndSRXkNmQ2PLiCv3XtrzpR24uG7HncBq2KCF3xxRrhDGHCUa QXXqUTTcDfjNzu25N/hnWyrrVS2D7JH0CrpT7ryM0uYRpY46Se/8u10tTZbfdviG+UKX CSxg== 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:mime-version:content-transfer-encoding; bh=pfOqd0W163btym5ANgJ/IhyJiwPH1qS8Yj0O7sKwHiQ=; b=pvd0SJNF0429hChATFj9UKwngfBX7DYRGKTwGdWG2yS7OLXS18TDdy6mm/nrbqOVXR ge7bf6E7r/SOhhi8bez8bJ51shRro7qPqOSXfkeLlm7LC6C8DKFFRVBeWgnNCrepDqVw pB/3nSu9HBaGjX/6gtWUXinHHJvdIxeVxH80nNIp+1zeRu3ALTkp0kJ1TWyVTm6JIEL3 FeFWuuAvYF9PouKA9YmJxAw1FCMfxrFBCyfOytJrAe4cJESRRnZDKW1YfEx0Qs84lVtJ au0WVaFIMpWvU3yR7vdgP+lzTpKnwZnEuFYP5v3vVuMAHXeX6X846gm9MFB3bKgqFRR6 GZ1g== X-Gm-Message-State: AOAM531jusEIeUG5HqFh0hFjHFXjrvqL7iJz+mZJhHpJSowUFV4mRijh QVta6GjC10FwpM9jqo4sj20QRxR25+Q= X-Received: by 2002:a17:90a:6e4f:: with SMTP id s15mr3459723pjm.194.1589995686158; Wed, 20 May 2020 10:28:06 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id k18sm2643672pfg.217.2020.05.20.10.28.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2020 10:28:05 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v9 3/5] include/elf: Add defines related to GNU property notes for AArch64 Date: Wed, 20 May 2020 10:27:58 -0700 Message-Id: <20200520172800.8499-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200520172800.8499-1-richard.henderson@linaro.org> References: <20200520172800.8499-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1042; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1042.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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, alex.bennee@linaro.org, laurent@vivier.eu 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. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/elf.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) -- 2.20.1 diff --git a/include/elf.h b/include/elf.h index 8fbfe60e09..9db4aae40c 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 @@ -1652,6 +1656,24 @@ typedef struct elf64_shdr { #define NT_ARM_SYSTEM_CALL 0x404 /* ARM system call number */ #define NT_ARM_SVE 0x405 /* ARM Scalable Vector Extension regs */ +/* 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. *