* [binutils-gdb] Fix missing "Core was generated by" when loading a x32 corefile.
@ 2023-02-27 13:01 Nick Clifton
0 siblings, 0 replies; only message in thread
From: Nick Clifton @ 2023-02-27 13:01 UTC (permalink / raw)
To: bfd-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c38463074e08a6443a283215d7899d71480715d0
commit c38463074e08a6443a283215d7899d71480715d0
Author: Felix Willgerodt <felix.willgerodt@intel.com>
Date: Mon Feb 27 13:01:06 2023 +0000
Fix missing "Core was generated by" when loading a x32 corefile.
Diff:
---
bfd/ChangeLog | 5 +++++
bfd/elf64-x86-64.c | 16 ++++++++++++++--
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 50e1e17ef4d..cac222cd564 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2023-02-27 Felix Willgerodt <felix.willgerodt@intel.com>
+
+ * elf64-x86-64.c (elf_x86_64_grok_psinfo): Check for
+ elf_external_linux_prpsinfo32_ugid32.
+
2023-02-23 Fangrui Song <i@maskray.me>
* elfnn-riscv.c (struct riscv_elf_link_hash_table): Add params.
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index ef0ebdd6967..0aa9af5d8fc 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -389,7 +389,8 @@ elf_x86_64_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
default:
return false;
- case 124: /* sizeof(struct elf_prpsinfo) on Linux/x32 */
+ case 124:
+ /* sizeof (struct elf_external_linux_prpsinfo32_ugid16). */
elf_tdata (abfd)->core->pid
= bfd_get_32 (abfd, note->descdata + 12);
elf_tdata (abfd)->core->program
@@ -398,7 +399,18 @@ elf_x86_64_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
= _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
break;
- case 136: /* sizeof(struct elf_prpsinfo) on Linux/x86_64 */
+ case 128:
+ /* sizeof (struct elf_external_linux_prpsinfo32_ugid32). */
+ elf_tdata (abfd)->core->pid
+ = bfd_get_32 (abfd, note->descdata + 12);
+ elf_tdata (abfd)->core->program
+ = _bfd_elfcore_strndup (abfd, note->descdata + 32, 16);
+ elf_tdata (abfd)->core->command
+ = _bfd_elfcore_strndup (abfd, note->descdata + 48, 80);
+ break;
+
+ case 136:
+ /* sizeof (struct elf_prpsinfo) on Linux/x86_64. */
elf_tdata (abfd)->core->pid
= bfd_get_32 (abfd, note->descdata + 24);
elf_tdata (abfd)->core->program
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-27 13:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-27 13:01 [binutils-gdb] Fix missing "Core was generated by" when loading a x32 corefile Nick Clifton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).