From patchwork Wed May 23 00:15:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Clark X-Patchwork-Id: 10419959 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 D2138600CC for ; Wed, 23 May 2018 00:35:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF8E028E55 for ; Wed, 23 May 2018 00:35:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B3E4128E87; Wed, 23 May 2018 00:35:23 +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 33D4728E55 for ; Wed, 23 May 2018 00:35:22 +0000 (UTC) Received: from localhost ([::1]:58585 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLHkP-0005Js-G5 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 22 May 2018 20:35:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42905) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLHU7-0000dq-FL for qemu-devel@nongnu.org; Tue, 22 May 2018 20:18:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fLHU3-0001TM-DU for qemu-devel@nongnu.org; Tue, 22 May 2018 20:18:31 -0400 Received: from mail-pf0-x231.google.com ([2607:f8b0:400e:c00::231]:34652) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fLHU3-0001T8-6o for qemu-devel@nongnu.org; Tue, 22 May 2018 20:18:27 -0400 Received: by mail-pf0-x231.google.com with SMTP id a14-v6so9558070pfi.1 for ; Tue, 22 May 2018 17:18:27 -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:in-reply-to:references; bh=NZThUF5xjJmQCZTKKe+QtnkN9NbmMhq8YVtsoD3DWFg=; b=PfALXIGM7OQztRM6fwET4utb1UO81wP9GkCxooyzh+rY8r1HeYuZmdTs3lvXj6AWuO nAlPZINaZBZXbmz8WUwuNrUybMIjKdx8z03cXIwEjhwYQY2QmuYaUW9Jsu0kd+ME7alT 1zyE9nRzkcOyoxsM+V9LCbmzQ2WJLtLuMV5M/QRbURZhTaRxOiK47N645BSyOH5FyUX6 Nlcl/g6a2wBpqIkA4+iTuwvFlzLYqtyNjdOvB16NbG7aOJWJOSJRy8CzTPKT9OytU4GN VGM4MUh7c1HzhPe0DPxmDBdYbEDdnHvezD8E6avVOcDBh/FDkROjrbT2zMhqLNNOoRuC QKpg== 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=NZThUF5xjJmQCZTKKe+QtnkN9NbmMhq8YVtsoD3DWFg=; b=RBL64zB7nVOOgVmweLr/m207U8Vf4xXA/Y0O4UicNsk215lssGASeN2l0jQc1jN9HD ms34NrGtREIkQ5+2EloAyK0uy//NKLru5iwRZFmOzHwccv2ZCa1ytkE+Il9DY8Rc9K5i A0P1t72Hl/BwIh6aEmmCRxDE2yAQlCisgBjzmYWckC3ikvF3upgcj0ZN8MAy+4n5KTn8 DuGD1xyH+syFU9LTvLCxi26Yy39eizYjl7bLURIMUk/cdA3ABkieFR2vQa69bHUjkjsT q9DH9p6Ovrsv0OmYKDqm9WvE99yUHC8Ux6aqBdAUXToIfl2VmWFruiYt+vXrp+KdcSs8 mMPg== X-Gm-Message-State: ALKqPwdfNDjt+XebZHO/JqYAo2fDHzU9VL1a56bWH6KaP+bhqFLcQJRP 2XKxC70xMR7/03Ez4Lufks2pqgcZX8s= X-Google-Smtp-Source: AB8JxZoLJBlO1IObFxmZz0RMQzLUEcGbFqSaSok6mMciVXN+6aIgBI03THI7PLga8we35W0k8OMFVA== X-Received: by 2002:a63:9e01:: with SMTP id s1-v6mr504321pgd.66.1527034706274; Tue, 22 May 2018 17:18:26 -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 j1-v6sm28935626pfh.95.2018.05.22.17.18.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 May 2018 17:18:25 -0700 (PDT) From: Michael Clark To: qemu-devel@nongnu.org Date: Wed, 23 May 2018 12:15:14 +1200 Message-Id: <1527034517-7851-28-git-send-email-mjc@sifive.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1527034517-7851-1-git-send-email-mjc@sifive.com> References: <1527034517-7851-1-git-send-email-mjc@sifive.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::231 Subject: [Qemu-devel] [PATCH v1 27/30] 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 --- include/elf.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/elf.h b/include/elf.h index 934dbbd6b3ae..d363ba85a688 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;