Fix missing "Core was generated by" when loading a x32 corefile.
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 50e1e17..cac222c 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 ef0ebdd..0aa9af5 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -389,7 +389,8 @@
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 @@
= _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