From 888a447e15f0f3349826358a16f7d2756b0bb226 Mon Sep 17 00:00:00 2001 From: Andrew Pinski Date: Thu, 10 Sep 2015 20:02:38 +0800 Subject: 2015-09-22 Andrew Pinski * elfxx-aarch64.c (_bfd_aarch64_elf_grok_prstatus): Add ILP32 sized prstatus. (_bfd_aarch64_elf_grok_psinfo): Likewise. --- bfd/ChangeLog | 6 ++++++ bfd/elfxx-aarch64.c | 26 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 108e4bd..027dcc7 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2015-09-22 Andrew Pinski + + * elfxx-aarch64.c (_bfd_aarch64_elf_grok_prstatus): + Add ILP32 sized prstatus. + (_bfd_aarch64_elf_grok_psinfo): Likewise. + 2015-09-07 Andrew Pinski * cpu-aarch64.c (compatible): diff --git a/bfd/elfxx-aarch64.c b/bfd/elfxx-aarch64.c index 34bd1a6..f34ad9f 100644 --- a/bfd/elfxx-aarch64.c +++ b/bfd/elfxx-aarch64.c @@ -556,6 +556,22 @@ _bfd_aarch64_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) size = 272; break; + + case 352: /* sizeof(struct elf_prstatus) on Linux/arm64_ilp32. */ + /* pr_cursig */ + elf_tdata (abfd)->core->signal + = bfd_get_16 (abfd, note->descdata + 12); + + /* pr_pid */ + elf_tdata (abfd)->core->lwpid + = bfd_get_32 (abfd, note->descdata + 32); + + /* pr_reg */ + offset = 72; + size = 272; + + break; + } /* Make a ".reg/999" section. */ @@ -577,6 +593,15 @@ _bfd_aarch64_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) = _bfd_elfcore_strndup (abfd, note->descdata + 40, 16); elf_tdata (abfd)->core->command = _bfd_elfcore_strndup (abfd, note->descdata + 56, 80); + break; + + case 124: /* This is sizeof(struct elf_prpsinfo) on Linux/aarch64_ilp32. */ + elf_tdata (abfd)->core->pid = bfd_get_32 (abfd, note->descdata + 12); + elf_tdata (abfd)->core->program + = _bfd_elfcore_strndup (abfd, note->descdata + 28, 16); + elf_tdata (abfd)->core->command + = _bfd_elfcore_strndup (abfd, note->descdata + 44, 80); + break; } /* Note that for some reason, a spurious space is tacked @@ -598,6 +623,7 @@ char * _bfd_aarch64_elf_write_core_note (bfd *abfd, char *buf, int *bufsiz, int note_type, ...) { + /* TODO ILP32 support. */ switch (note_type) { default: -- cgit v1.1