public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Re-map value of NT_RISCV_CSR to not collide with the value of NT_RISCV_VECTOR in Linux kernel header file 'include/uapi/linux/elf.h'
@ 2023-08-09 17:53 Greg Savin
  2023-08-10 18:39 ` John Baldwin
  0 siblings, 1 reply; 12+ messages in thread
From: Greg Savin @ 2023-08-09 17:53 UTC (permalink / raw)
  To: gdb-patches, binutils, palmer, greentime.hu; +Cc: Greg Savin

Linux kernel's file 'include/uapi/linux/elf.h' declares the value 0x900
for NT_RISCV_VECTOR, and does not have a definition for NT_RISCV_CSR, nor
does it use the value 0x901 for any note type.  This patch is intended
as a way to resolve the disagreement/collision between Linux and binutils,
over the meaning of 0x900 in the context of note types.

---
 include/elf/common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/elf/common.h b/include/elf/common.h
index ffa6b60bd2b..0bbe245519e 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -713,7 +713,7 @@
 					/*   note name must be "LINUX".  */
 #define NT_LARCH_LBT    0xa04		/* LoongArch Binary Translation registers */
 					/*   note name must be "CORE".  */
-#define NT_RISCV_CSR    0x900		/* RISC-V Control and Status Registers */
+#define NT_RISCV_CSR    0x901		/* RISC-V Control and Status Registers */
 					/*   note name must be "LINUX".  */
 #define NT_SIGINFO	0x53494749	/* Fields of siginfo_t.  */
 #define NT_FILE		0x46494c45	/* Description of mapped files.  */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-08-12  0:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-09 17:53 [PATCH] Re-map value of NT_RISCV_CSR to not collide with the value of NT_RISCV_VECTOR in Linux kernel header file 'include/uapi/linux/elf.h' Greg Savin
2023-08-10 18:39 ` John Baldwin
2023-08-10 18:56   ` Greg Savin
2023-08-10 20:00     ` John Baldwin
2023-08-10 22:11       ` Greg Savin
2023-08-10 22:11         ` [PATCH v2 1/2] Reset note name of NT_RISCV_CSR to "GDB" to be consistent with the intent described in commit db6092f3aec43ea4d10efc5ff74274f04cdc0ad6 Greg Savin
2023-08-11 12:23           ` Andrew Burgess
2023-08-10 22:11         ` [PATCH v2 2/2] Propagate NT_RISCV_VECTOR from Linux kernel headers to binutils. The value is identical to pre-existing NT_RISCV_CSR but the note names different (NT_RISCV_CSR is "GDB" and NT_RISCV_VECTOR is "CORE") Greg Savin
2023-08-11 12:51           ` Andrew Burgess
2023-08-11 16:43             ` Palmer Dabbelt
2023-08-12  0:47               ` John Baldwin
2023-08-12  0:50                 ` Palmer Dabbelt

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 read-only IMAP folder(s) and NNTP newsgroup(s).