From patchwork Tue May 3 15:14:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 53422 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A52B0394D881 for ; Tue, 3 May 2022 15:15:05 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by sourceware.org (Postfix) with ESMTPS id DB5D1384859C for ; Tue, 3 May 2022 15:14:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DB5D1384859C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nefkom.net Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4Kt3RK0Bvqz1r153 for ; Tue, 3 May 2022 17:14:53 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4Kt3RJ71hJz1qqkC for ; Tue, 3 May 2022 17:14:52 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id H5yr9wDHzB76 for ; Tue, 3 May 2022 17:14:52 +0200 (CEST) X-Auth-Info: n7PVqFPFGkBKXEDVGvZ9pOIUmbgEiarupeIBmdgcgAkwL006KK2FEf/5sL7MH2In Received: from igel.home (ppp-46-244-189-10.dynamic.mnet-online.de [46.244.189.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA for ; Tue, 3 May 2022 17:14:52 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id D9FBB2C3976; Tue, 3 May 2022 17:14:51 +0200 (CEST) From: Andreas Schwab To: libc-alpha@sourceware.org Subject: [PATCH] Update RISC-V specific ELF definitions X-Yow: Do you guys know we just passed thru a BLACK HOLE in space? Date: Tue, 03 May 2022 17:14:51 +0200 Message-ID: <87czgubqc4.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" The definitions are taken from the 1.0-rc2 version of the ELF psABI. Reviewed-by: Fangrui Song --- elf/elf.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/elf/elf.h b/elf/elf.h index 0195029188..648bf66c7d 100644 --- a/elf/elf.h +++ b/elf/elf.h @@ -3927,6 +3927,8 @@ enum #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 /* RISC-V relocations. */ #define R_RISCV_NONE 0 @@ -3987,6 +3989,18 @@ enum #define R_RISCV_NUM 59 +/* RISC-V specific values for the st_other field. */ +#define STO_RISCV_VARIANT_CC 0x80 + +/* RISC-V specific values for the sh_type field. */ +#define SHT_RISCV_ATTRIBUTES (SHT_LOPROC + 3) + +/* RISC-V specific values for the p_type field. */ +#define PT_RISCV_ATTRIBUTES (PT_LOPROC + 3) + +/* RISC-V specific values for the d_tag field. */ +#define DT_RISCV_VARIANT_CC (DT_LOPROC + 1) + /* BPF specific declarations. */ #define R_BPF_NONE 0 /* No reloc */