From patchwork Tue Dec 25 20:54:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 154471 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp5208446ljp; Tue, 25 Dec 2018 12:56:14 -0800 (PST) X-Google-Smtp-Source: AFSGD/VvRxVtTaawfwJQ+bRxyNLSC/zhQGoaBY9tZWt67DWV0e+Cz+cfocKecfaLuDWpKBqvltrE X-Received: by 2002:ac8:3d51:: with SMTP id u17mr16610979qtf.127.1545771374388; Tue, 25 Dec 2018 12:56:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545771374; cv=none; d=google.com; s=arc-20160816; b=gK2fIn78RqAJKqwXSYQC5qFW+DNR8Yegudfxei+x/xbPQXEPMYTgoAN3yJ3YbThEVv 7/EYOXf5pUs83FzE96m+KB85ypZY1JmIYINxb0LM8u080y40uImQIJZWo6C8IAYdTVXd oJeGrF5WHrKx+E490UWdkBQKnFocyib1dk81Uvdca+RKr3g7sVcz/3Ic3Hmf2zsAPRwM SUsyMowNRQHMJoEH7CK9U556hzzEvZACRFTj2ezSLOfP8iHFD/m2/JkGwQ+H2uTpAK1p Z0vQYoR5R+lVsOw0R2dzFokpNbY3Mw0P9whGvJP8LXeprLzISMnXPRpRah12v9jFWuFW oRWw== 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=eS0ECqQ0s+c55K3NRcsIww6wqyw22qAIIc4P6tHLUsA=; b=N9yVehD5o8xczLV/Gmjl5AweGkC5Zry9KFefD72W4ObFk0hR44N/EMsIXcqPAZ/96j O8eztRoPGLOobej8aqtYAumBmXLvH0cRb9V4yLVQKnqUZr2liJo6F2xMvosOFRD/xHvP UIiEjTEq0RODYAq/HLrhsl4SKQCcgU0vGqio1/biJ5UDajssDHTPjb9ymhro9P8UTJoI HnTA0Czgk4k62MMQkdIu43jJcUkcdrOG0v1hXui4KvOjflk/U6mBRNT5dgULa4Y3EW/B CeSUUSkahhpxOFmCqIOUIYvCbTNfUE6H44IFUEyEuyrJ4jskS4sFPu2XLpoedSA8qDVq T9MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=WC22rY7N; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.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. [208.118.235.17]) by mx.google.com with ESMTPS id k124si10227qkd.2.2018.12.25.12.56.14 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 25 Dec 2018 12:56:14 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=WC22rY7N; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.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]:43010 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gbtkL-0003k0-QT for patch@linaro.org; Tue, 25 Dec 2018 15:56:13 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gbtk0-0003hM-BP for qemu-devel@nongnu.org; Tue, 25 Dec 2018 15:55:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gbtjz-0006EM-Fq for qemu-devel@nongnu.org; Tue, 25 Dec 2018 15:55:52 -0500 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:38784) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gbtjz-0006DB-9J for qemu-devel@nongnu.org; Tue, 25 Dec 2018 15:55:51 -0500 Received: by mail-pf1-x432.google.com with SMTP id q1so7075209pfi.5 for ; Tue, 25 Dec 2018 12:55:51 -0800 (PST) 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=eS0ECqQ0s+c55K3NRcsIww6wqyw22qAIIc4P6tHLUsA=; b=WC22rY7N0VEcHHqRAkU4VI+hosj7IZO4T1v7nmvlQRgOtxhEXOKBSG1+ckKej6oHbQ qjOzCxipaWfqnnMBsCdsqgNigujYJAjaBYYgmWqSo8c44ZuferAluNhmGQYYK/6//jqC kYimifPTvKfiHSJaBKdAAaLkYHYWbjqmMYGUk= 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=eS0ECqQ0s+c55K3NRcsIww6wqyw22qAIIc4P6tHLUsA=; b=rzRzy2tsXzsFzi5N29aDH1rQqOwdsOoctgW9EY+yuehUV6bEfQca3vVgvsydcZpYgU pFdnEI8UXZC1A2XrWoJPgvukinpVQCty6RPrKquGJC47lm9DzNhH5MsMPozWtKJ9m8mw vx1ocddZwjd1kK+Wgbwt5dxmQ0jSoq3Oqqtkz7+r/EAkZ3mnIgoCNh84qZDq3jiQej6E AyFxNKlCtqG86OynWtMiR5XAsGfAXsmDbYwSdeh8ol6zUc4YYVwQGWNa8uBJNOMxyu8I 8AlnQQh2mw0dUSKssMezTVdQWHHrVp/ya3jbNHwj3GKCc+cmOSQJUEuIRZCDm6KG6SlH ocKQ== X-Gm-Message-State: AJcUukdbZ3r8zCAa3UAWSdMigwoFtguCHSy3lv+P/0/LOAxfFJSOcOhu er/qWLmYcMDgx/ee7pzWHqmtMSrjsAw= X-Received: by 2002:a63:b24a:: with SMTP id t10mr16139078pgo.223.1545771350020; Tue, 25 Dec 2018 12:55:50 -0800 (PST) Received: from cloudburst.home (c211-28-135-144.sunsh3.vic.optusnet.com.au. [211.28.135.144]) by smtp.gmail.com with ESMTPSA id t21sm48501628pgg.24.2018.12.25.12.55.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Dec 2018 12:55:49 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 26 Dec 2018 07:54:48 +1100 Message-Id: <20181225205529.10874-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181225205529.10874-1-richard.henderson@linaro.org> References: <20181225205529.10874-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::432 Subject: [Qemu-devel] [PULL 01/42] elf.h: Add the RISCV ELF magic numbers 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, Michael Clark , Alistair Francis Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Alistair Francis Signed-off-by: Alistair Francis Signed-off-by: Michael Clark Reviewed-by: Richard Henderson Message-Id: <02fc0b3a733f5f08eb396bee5afd3d327941f0c9.1545246859.git.alistair.francis@wdc.com> Signed-off-by: Richard Henderson --- include/elf.h | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) -- 2.17.2 diff --git a/include/elf.h b/include/elf.h index c151164b63..0ac7911b7b 100644 --- a/include/elf.h +++ b/include/elf.h @@ -1338,6 +1338,61 @@ typedef struct { #define R_IA64_DTPREL64LSB 0xb7 /* @dtprel(sym + add), data8 LSB */ #define R_IA64_LTOFF_DTPREL22 0xba /* @ltoff(@dtprel(s+a)), imm22 */ +/* RISC-V relocations. */ +#define R_RISCV_NONE 0 +#define R_RISCV_32 1 +#define R_RISCV_64 2 +#define R_RISCV_RELATIVE 3 +#define R_RISCV_COPY 4 +#define R_RISCV_JUMP_SLOT 5 +#define R_RISCV_TLS_DTPMOD32 6 +#define R_RISCV_TLS_DTPMOD64 7 +#define R_RISCV_TLS_DTPREL32 8 +#define R_RISCV_TLS_DTPREL64 9 +#define R_RISCV_TLS_TPREL32 10 +#define R_RISCV_TLS_TPREL64 11 +#define R_RISCV_BRANCH 16 +#define R_RISCV_JAL 17 +#define R_RISCV_CALL 18 +#define R_RISCV_CALL_PLT 19 +#define R_RISCV_GOT_HI20 20 +#define R_RISCV_TLS_GOT_HI20 21 +#define R_RISCV_TLS_GD_HI20 22 +#define R_RISCV_PCREL_HI20 23 +#define R_RISCV_PCREL_LO12_I 24 +#define R_RISCV_PCREL_LO12_S 25 +#define R_RISCV_HI20 26 +#define R_RISCV_LO12_I 27 +#define R_RISCV_LO12_S 28 +#define R_RISCV_TPREL_HI20 29 +#define R_RISCV_TPREL_LO12_I 30 +#define R_RISCV_TPREL_LO12_S 31 +#define R_RISCV_TPREL_ADD 32 +#define R_RISCV_ADD8 33 +#define R_RISCV_ADD16 34 +#define R_RISCV_ADD32 35 +#define R_RISCV_ADD64 36 +#define R_RISCV_SUB8 37 +#define R_RISCV_SUB16 38 +#define R_RISCV_SUB32 39 +#define R_RISCV_SUB64 40 +#define R_RISCV_GNU_VTINHERIT 41 +#define R_RISCV_GNU_VTENTRY 42 +#define R_RISCV_ALIGN 43 +#define R_RISCV_RVC_BRANCH 44 +#define R_RISCV_RVC_JUMP 45 +#define R_RISCV_RVC_LUI 46 +#define R_RISCV_GPREL_I 47 +#define R_RISCV_GPREL_S 48 +#define R_RISCV_TPREL_I 49 +#define R_RISCV_TPREL_S 50 +#define R_RISCV_RELAX 51 +#define R_RISCV_SUB6 52 +#define R_RISCV_SET6 53 +#define R_RISCV_SET8 54 +#define R_RISCV_SET16 55 +#define R_RISCV_SET32 56 + typedef struct elf32_rel { Elf32_Addr r_offset; Elf32_Word r_info;