From: Helge Deller <deller@kernel.org>
To: qemu-devel@nongnu.org
Cc: "Laurent Vivier" <laurent@vivier.eu>,
"Aleksandar Rikalo" <arikalo@gmail.com>,
"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>,
"Helge Deller" <deller@gmx.de>,
"Jiaxun Yang" <jiaxun.yang@flygoat.com>,
"Aurelien Jarno" <aurelien@aurel32.net>,
"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>
Subject: [PULL 3/5] linux-user/riscv: copy the executable's e_flags into core dumps
Date: Sun, 4 Oct 2026 13:43:08 +0200 [thread overview]
Message-ID: <20261004114311.3874-4-deller@kernel.org> (raw)
In-Reply-To: <20261004114311.3874-1-deller@kernel.org>
From: Matt Turner <mattst88@gmail.com>
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.
Signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
---
linux-user/riscv/target_elf.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/linux-user/riscv/target_elf.h b/linux-user/riscv/target_elf.h
index 185b81a2db..e99a9d92ca 100644
--- a/linux-user/riscv/target_elf.h
+++ b/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
next prev parent reply other threads:[~2026-10-04 11:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-04 11:43 [PULL 0/5] Linux user next patches Helge Deller
2026-10-04 11:43 ` [PULL 1/5] linux-user: add elf_core_eflags() hook for core dump e_flags Helge Deller
2026-10-04 11:43 ` [PULL 2/5] linux-user/mips64: set EF_MIPS_ABI2 in mipsn32 core dumps Helge Deller
2026-10-04 11:43 ` Helge Deller [this message]
2026-10-04 11:43 ` [PULL 4/5] target/mips: fix Loongson-3A4000 definition to have abs2008 and nan2008 Helge Deller
2026-10-04 11:43 ` [PULL 5/5] linux-user/mips: pick Loongson-3A4000 if a pre-r6 mips64 binary needs nan2008 Helge Deller
2026-10-06 9:24 ` [PULL 0/5] Linux user next patches Richard Henderson
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=20261004114311.3874-4-deller@kernel.org \
--to=deller@kernel.org \
--cc=arikalo@gmail.com \
--cc=aurelien@aurel32.net \
--cc=deller@gmx.de \
--cc=jiaxun.yang@flygoat.com \
--cc=laurent@vivier.eu \
--cc=philmd@oss.qualcomm.com \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-devel@nongnu.org \
/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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.