mailing list of musl libc
 help / color / mirror / code / Atom feed
From: enh <enh@google.com>
To: musl@lists.openwall.com
Subject: [musl] [PATCH] elf.h: add risc-v ELF e_flags constants.
Date: Thu, 21 Mar 2024 13:23:15 -0700	[thread overview]
Message-ID: <CAJgzZopUdpbE7E0RTnR0ponbc6aM7EZJ+eBP_UKQUvoQDa3RxA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 196 bytes --]

Names and values all taken from here:
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc#file-header
---
 include/elf.h | 9 +++++++++
 1 file changed, 9 insertions(+)

[-- Attachment #2: 0001-elf.h-add-risc-v-ELF-e_flags-constants.patch --]
[-- Type: application/octet-stream, Size: 1056 bytes --]

From 7ed1556428e6114e88091f2d0d5b593df7e1e3b1 Mon Sep 17 00:00:00 2001
From: Elliott Hughes <enh@google.com>
Date: Thu, 21 Mar 2024 13:20:16 -0700
Subject: [PATCH] elf.h: add risc-v ELF e_flags constants.

Names and values all taken from here:
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc#file-header
---
 include/elf.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/elf.h b/include/elf.h
index 3d5e13e4..88c4d96b 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -3250,6 +3250,15 @@ enum
 #define R_BPF_NONE		0
 #define R_BPF_MAP_FD		1
 
+#define EF_RISCV_RVC              0x01
+#define EF_RISCV_FLOAT_ABI        0x06
+#define EF_RISCV_FLOAT_ABI_SOFT   0x00
+#define EF_RISCV_FLOAT_ABI_SINGLE 0x02
+#define EF_RISCV_FLOAT_ABI_DOUBLE 0x04
+#define EF_RISCV_FLOAT_ABI_QUAD   0x06
+#define EF_RISCV_RVE              0x08
+#define EF_RISCV_TSO              0x10
+
 #define R_RISCV_NONE            0
 #define R_RISCV_32              1
 #define R_RISCV_64              2
-- 
2.44.0.396.g6e790dbe36-goog


                 reply	other threads:[~2024-03-21 20:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJgzZopUdpbE7E0RTnR0ponbc6aM7EZJ+eBP_UKQUvoQDa3RxA@mail.gmail.com \
    --to=enh@google.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).