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 1/5] linux-user: add elf_core_eflags() hook for core dump e_flags
Date: Sun, 4 Oct 2026 13:43:06 +0200 [thread overview]
Message-ID: <20261004114311.3874-2-deller@kernel.org> (raw)
In-Reply-To: <20261004114311.3874-1-deller@kernel.org>
From: Matt Turner <mattst88@gmail.com>
Let targets set e_flags in the core file header. Default to 0, as
before.
Signed-off-by: Helge Deller <deller@gmx.de>
---
linux-user/elfload.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index c4bdaa146a..c188fa03c3 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -144,6 +144,10 @@ typedef abi_int target_pid_t;
#define EXSTACK_DEFAULT false
#endif
+#ifndef elf_core_eflags
+#define elf_core_eflags(info) 0
+#endif
+
/*
* Provide fallback definitions that the target may omit.
* One way or another, we'll get a link error if the setting of
@@ -2212,7 +2216,8 @@ static int elf_core_dump(int signr, const CPUArchState *env)
/* Create elf file header. */
hptr = header;
- fill_elf_header(hptr, css.count + 1, ELF_MACHINE, 0);
+ fill_elf_header(hptr, css.count + 1, ELF_MACHINE,
+ elf_core_eflags(ts->info));
hptr += sizeof(struct elfhdr);
/* Create elf program headers. */
--
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 ` Helge Deller [this message]
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 ` [PULL 3/5] linux-user/riscv: copy the executable's e_flags into " Helge Deller
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-2-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.