All of lore.kernel.org
 help / color / mirror / Atom feed
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 2/5] linux-user/mips64: set EF_MIPS_ABI2 in mipsn32 core dumps
Date: Sun,  4 Oct 2026 13:43:07 +0200	[thread overview]
Message-ID: <20261004114311.3874-3-deller@kernel.org> (raw)
In-Reply-To: <20261004114311.3874-1-deller@kernel.org>

From: Matt Turner <mattst88@gmail.com>

mipsn32 core files had e_flags 0, so gdb took them for o32, found no
general-purpose registers and failed with an internal error in
frame_unwind_find_by_frame.

Linux sets e_flags to EF_MIPS_ABI2 for n32 cores (user_mipsn32_view in
arch/mips/kernel/ptrace.c).

Signed-off-by: Helge Deller <deller@gmx.de>
---
 linux-user/mips64/target_elf.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/linux-user/mips64/target_elf.h b/linux-user/mips64/target_elf.h
index efb5d97563..fd9fb89269 100644
--- a/linux-user/mips64/target_elf.h
+++ b/linux-user/mips64/target_elf.h
@@ -16,6 +16,8 @@
 
 #ifdef TARGET_ABI_MIPSN32
 #define elf_check_abi(x)        ((x) & EF_MIPS_ABI2)
+/* See linux kernel: arch/mips/kernel/ptrace.c, user_mipsn32_view.  */
+#define elf_core_eflags(info)   EF_MIPS_ABI2
 #else
 #define elf_check_abi(x)        (!((x) & EF_MIPS_ABI2))
 #endif
-- 
2.54.0



  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 ` Helge Deller [this message]
2026-10-04 11:43 ` [PULL 3/5] linux-user/riscv: copy the executable's e_flags into core dumps 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-3-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.