aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-hppa.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2005-12-04 14:58:11 +0000
committerMark Kettenis <kettenis@gnu.org>2005-12-04 14:58:11 +0000
commit927e625f4b07212ae9f41ecfb9412dd230d32b72 (patch)
tree9c60a638da6a8ec14c5109acbb138bb0480b2c6e /bfd/elf64-hppa.c
parentcd05c5d15305aefaa7b98da3c2ad27c2afb84445 (diff)
downloadgdb-927e625f4b07212ae9f41ecfb9412dd230d32b72.zip
gdb-927e625f4b07212ae9f41ecfb9412dd230d32b72.tar.gz
gdb-927e625f4b07212ae9f41ecfb9412dd230d32b72.tar.bz2
* elf64-hppa.c (elf64_hppa_section_from_phdr): Create .kernel
pseudo-section. Make sure .reg section comes after the proc section it's generated from.
Diffstat (limited to 'bfd/elf64-hppa.c')
-rw-r--r--bfd/elf64-hppa.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c
index 42a04a1..fbd6458 100644
--- a/bfd/elf64-hppa.c
+++ b/bfd/elf64-hppa.c
@@ -2652,6 +2652,22 @@ static bfd_boolean
elf64_hppa_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int index,
const char *typename)
{
+ if (hdr->p_type == PT_HP_CORE_KERNEL)
+ {
+ asection *sect;
+
+ if (!_bfd_elf_make_section_from_phdr (abfd, hdr, index, typename))
+ return FALSE;
+
+ sect = bfd_make_section_anyway (abfd, ".kernel");
+ if (sect == NULL)
+ return FALSE;
+ sect->size = hdr->p_filesz;
+ sect->filepos = hdr->p_offset;
+ sect->flags = SEC_HAS_CONTENTS | SEC_READONLY;
+ return TRUE;
+ }
+
if (hdr->p_type == PT_HP_CORE_PROC)
{
int sig;
@@ -2663,10 +2679,12 @@ elf64_hppa_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int index,
elf_tdata (abfd)->core_signal = sig;
- /* gdb uses the ".reg" section to read register contents. */
- if (!_bfd_elfcore_make_pseudosection (abfd, ".reg", hdr->p_filesz,
- hdr->p_offset))
+ if (!_bfd_elf_make_section_from_phdr (abfd, hdr, index, typename))
return FALSE;
+
+ /* GDB uses the ".reg" section to read register contents. */
+ return _bfd_elfcore_make_pseudosection (abfd, ".reg", hdr->p_filesz,
+ hdr->p_offset);
}
if (hdr->p_type == PT_HP_CORE_LOADABLE