summaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 4a150de960..9cecb24922 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -10489,11 +10489,22 @@ elfcore_write_linux_prpsinfo64
(bfd *abfd, char *buf, int *bufsiz,
const struct elf_internal_linux_prpsinfo *prpsinfo)
{
- struct elf_external_linux_prpsinfo64 data;
+ if (get_elf_backend_data (abfd)->linux_prpsinfo64_ugid16)
+ {
+ struct elf_external_linux_prpsinfo64_ugid16 data;
- swap_linux_prpsinfo64_out (abfd, prpsinfo, &data);
- return elfcore_write_note (abfd, buf, bufsiz,
- "CORE", NT_PRPSINFO, &data, sizeof (data));
+ swap_linux_prpsinfo64_ugid16_out (abfd, prpsinfo, &data);
+ return elfcore_write_note (abfd, buf, bufsiz,
+ "CORE", NT_PRPSINFO, &data, sizeof (data));
+ }
+ else
+ {
+ struct elf_external_linux_prpsinfo64_ugid32 data;
+
+ swap_linux_prpsinfo64_ugid32_out (abfd, prpsinfo, &data);
+ return elfcore_write_note (abfd, buf, bufsiz,
+ "CORE", NT_PRPSINFO, &data, sizeof (data));
+ }
}
char *