diff options
author | David Carlton <carlton@bactrian.org> | 2004-01-26 19:11:55 +0000 |
---|---|---|
committer | David Carlton <carlton@bactrian.org> | 2004-01-26 19:11:55 +0000 |
commit | 02f7156281e8b99504f335f55b29aa6ae307488b (patch) | |
tree | 83f502bee114165d0ca14a4ac612c2d8ae172e13 /bfd/elf32-sparc.c | |
parent | fcc929ef86456cb1cda90b1391209eed2446943d (diff) | |
download | gdb-02f7156281e8b99504f335f55b29aa6ae307488b.tar.gz |
2004-01-26 David Carlton <carlton@kealia.com>cvs/carlton_dictionary-branchcarlton_dictionary-branch
* Merge with mainline; tag is carlton_dictionary-20040126-merge.
Diffstat (limited to 'bfd/elf32-sparc.c')
-rw-r--r-- | bfd/elf32-sparc.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c index f77f22c7c35..c20e403588d 100644 --- a/bfd/elf32-sparc.c +++ b/bfd/elf32-sparc.c @@ -502,6 +502,35 @@ sparc_elf_lox10_reloc (abfd, return bfd_reloc_ok; } +/* Support for core dump NOTE sections. */ + +static bfd_boolean +elf32_sparc_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) +{ + switch (note->descsz) + { + default: + return FALSE; + + case 260: /* Solaris prpsinfo_t. */ + elf_tdata (abfd)->core_program + = _bfd_elfcore_strndup (abfd, note->descdata + 84, 16); + elf_tdata (abfd)->core_command + = _bfd_elfcore_strndup (abfd, note->descdata + 100, 80); + break; + + case 336: /* Solaris psinfo_t. */ + elf_tdata (abfd)->core_program + = _bfd_elfcore_strndup (abfd, note->descdata + 88, 16); + elf_tdata (abfd)->core_command + = _bfd_elfcore_strndup (abfd, note->descdata + 104, 80); + break; + } + + return TRUE; +} + + /* Functions for the SPARC ELF linker. */ /* The name of the dynamic interpreter. This is put in the .interp @@ -3451,6 +3480,7 @@ elf32_sparc_reloc_type_class (rela) elf32_sparc_final_write_processing #define elf_backend_gc_mark_hook elf32_sparc_gc_mark_hook #define elf_backend_gc_sweep_hook elf32_sparc_gc_sweep_hook +#define elf_backend_grok_psinfo elf32_sparc_grok_psinfo #define elf_backend_reloc_type_class elf32_sparc_reloc_type_class #define elf_backend_can_gc_sections 1 |