From patchwork Fri May 25 07:22:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Clark X-Patchwork-Id: 10426495 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C44FC6025B for ; Fri, 25 May 2018 07:25:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A338429594 for ; Fri, 25 May 2018 07:25:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 951A1295A2; Fri, 25 May 2018 07:25:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F290A29594 for ; Fri, 25 May 2018 07:25:51 +0000 (UTC) Received: from localhost ([::1]:42226 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fM76j-0007l0-41 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 25 May 2018 03:25:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fM75e-0007Pr-MG for qemu-devel@nongnu.org; Fri, 25 May 2018 03:24:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fM75b-0000ED-LN for qemu-devel@nongnu.org; Fri, 25 May 2018 03:24:42 -0400 Received: from mail-pl0-x22a.google.com ([2607:f8b0:400e:c01::22a]:37007) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fM75b-0000Dq-GD for qemu-devel@nongnu.org; Fri, 25 May 2018 03:24:39 -0400 Received: by mail-pl0-x22a.google.com with SMTP id w19-v6so2627810plq.4 for ; Fri, 25 May 2018 00:24:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id; bh=SwN8fIjB9yfKzXXaQ/eoSa8nfo4u0X9R2veRVypPCyY=; b=PCMB++92Qd1lchjPipzvz62XzGA+5PvMHmGbewPDRqqL2qUtwoXxuha67KLiB0ME1j A+LwLbO7VmwFnCbfHJe25YkiCj+vaCDtXhRnIUidmoA0EQGuwMEu/oo6Rb7i/Jx5meFL ybHQHCdN5QCCf8/LfPAeT8N98DFSSEe18j7MwLgodkE4hZ1CpfADF3JGkXK7PIjO3E6h RUTieN/TA3GqQ/V76pYGcz1oEwaYzq5esVDNZRCI7UWns3CmcxPGLdvGEVpTxpcJVTzN 2ykzdBVWw5Kuq1glS6WXUgZ+pHL1i/ekDgFr5rKM5vo9/j+3cURCorzTBzXO/gxMcuB8 Op5g== 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; bh=SwN8fIjB9yfKzXXaQ/eoSa8nfo4u0X9R2veRVypPCyY=; b=FzXmhYGe90qWN5TF2Qb0ED8Wv2AnQyD3MxSAZ0QxsLwIl7lc3khWx9AYM18GCX+ycD +HrnE5DRACsnT3aOi6Vxx9P1cA+vWYT5det4wwPzCxD8MH21tJKaPk/ieSBKWhmnGD+x y78Cpqkz0b4Tm+A7UJ2xozIiWniHKuGzt70TOlPgFrsTGrsyKrmiVUnSEd8zitAf4roT fe3QgMPJpUXH0Ls0PnuE/XoYDjQDMUdCdAINnkzVgkB0cPoJUFzTDcXCmGCvyYt0yVD1 Filo1+s6mzoirfJMTRtW+a8RtaUVT6f6bwqxkQy1pF6V5e+FcM9HFleArYc5vR+wDNDe 6P0A== X-Gm-Message-State: ALKqPwcgGUCPeZUrq0YvA73RnkH1SXS+cwTL8JI03eZlz+KIyy4o9oIe Cu0/ZdSmFswdU/Mt+VBIQwMJPPZxqKE= X-Google-Smtp-Source: AB8JxZo6DfjQsDgefkh+cNJILcAsovpy9ld7+Ji1igUV/jtN78kvBM5WPT4sNUvyfHvme+7TIt7HDw== X-Received: by 2002:a17:902:7109:: with SMTP id a9-v6mr1408629pll.271.1527233078486; Fri, 25 May 2018 00:24:38 -0700 (PDT) Received: from localhost.localdomain (122-58-167-22-fibre.bb.spark.co.nz. [122.58.167.22]) by smtp.gmail.com with ESMTPSA id u13-v6sm1662459pfn.59.2018.05.25.00.24.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 25 May 2018 00:24:37 -0700 (PDT) From: Michael Clark To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Date: Fri, 25 May 2018 19:22:40 +1200 Message-Id: <1527232960-51123-1-git-send-email-mjc@sifive.com> X-Mailer: git-send-email 2.7.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::22a Subject: [Qemu-devel] [PATCH v2] elf: Add RISC-V PSABI ELF header defines 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: Michael Tokarev , Richard Henderson , Laurent Vivier , Michael Clark , Alistair Francis , patches@groups.riscv.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Refer to the RISC-V PSABI specification for details: - https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md Cc: Michael Tokarev Cc: Laurent Vivier Cc: Richard Henderson Cc: Alistair Francis Signed-off-by: Michael Clark Reviewed-by: Laurent Vivier --- include/elf.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/elf.h b/include/elf.h index 934dbbd6b3ae..bd0493f43d19 100644 --- a/include/elf.h +++ b/include/elf.h @@ -1285,6 +1285,14 @@ 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 specific definitions. */ +#define EF_RISCV_RVC 0x0001 +#define EF_RISCV_FLOAT_ABI_SINGLE 0x0002 +#define EF_RISCV_FLOAT_ABI_DOUBLE 0x0004 +#define EF_RISCV_FLOAT_ABI_QUAD 0x0006 +#define EF_RISCV_RVE 0x0008 +#define EF_RISCV_TSO 0x0010 + typedef struct elf32_rel { Elf32_Addr r_offset; Elf32_Word r_info;