Since commit 8c94db0ae97c ("binfmt_elf: preserve original ELF e_flags
for core dumps"), Linux writes the main executable's e_flags into RISC-V
core files, so debuggers can see the float ABI and RVC. QEMU wrote 0.
---
linux-user/riscv/target_elf.h | 3 +++
1 file changed, 3 insertions(+)
diff --git ./linux-user/riscv/target_elf.h ./linux-user/riscv/target_elf.h
index 185b81a2db..e99a9d92ca 100644
--- ./linux-user/riscv/target_elf.h
+++ ./linux-user/riscv/target_elf.h
@@ -21,6 +21,9 @@
#define HAVE_ELF_HWCAP 1
#define HAVE_ELF_CORE_DUMP 1
+/* See linux kernel: ARCH_HAS_ELF_CORE_EFLAGS. */
+#define elf_core_eflags(info) ((info)->elf_flags)
+
/* Mirrors struct user_regs_struct: pc followed by x1 (ra) .. x31 (t6). */
typedef struct target_elf_gregset_t {
abi_ulong pc;
--
2.54.0