hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/arch/riscv/include/uapi/asm/elf.h
....@@ -9,8 +9,8 @@
99 * (at your option) any later version.
1010 */
1111
12
-#ifndef _UAPI_ASM_ELF_H
13
-#define _UAPI_ASM_ELF_H
12
+#ifndef _UAPI_ASM_RISCV_ELF_H
13
+#define _UAPI_ASM_RISCV_ELF_H
1414
1515 #include <asm/ptrace.h>
1616
....@@ -19,7 +19,10 @@
1919 typedef struct user_regs_struct elf_gregset_t;
2020 #define ELF_NGREG (sizeof(elf_gregset_t) / sizeof(elf_greg_t))
2121
22
+/* We don't support f without d, or q. */
23
+typedef __u64 elf_fpreg_t;
2224 typedef union __riscv_fp_state elf_fpregset_t;
25
+#define ELF_NFPREG (sizeof(struct __riscv_d_ext_state) / sizeof(elf_fpreg_t))
2326
2427 #if __riscv_xlen == 64
2528 #define ELF_RISCV_R_SYM(r_info) ELF64_R_SYM(r_info)
....@@ -92,4 +95,4 @@
9295 #define R_RISCV_32_PCREL 57
9396
9497
95
-#endif /* _UAPI_ASM_ELF_H */
98
+#endif /* _UAPI_ASM_RISCV_ELF_H */