diff options
author | dim <dim@FreeBSD.org> | 2010-11-22 20:52:18 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2010-11-22 20:52:18 +0000 |
commit | 71b42433f68a7680bcd07cef6c81b5a9bbe4e948 (patch) | |
tree | 09b00ba0fbac964aa5e3af51d7a50e20465b2577 /contrib/binutils/bfd | |
parent | 29458224998b52266f5d890a3d9bff4c1f5d3ccb (diff) | |
parent | 11b4830687fabb0a27817feb05bf835db82f3147 (diff) | |
download | FreeBSD-src-71b42433f68a7680bcd07cef6c81b5a9bbe4e948.zip FreeBSD-src-71b42433f68a7680bcd07cef6c81b5a9bbe4e948.tar.gz |
Sync: merge r215464 through r215708 from ^/head.
Diffstat (limited to 'contrib/binutils/bfd')
-rw-r--r-- | contrib/binutils/bfd/elf-bfd.h | 2 | ||||
-rw-r--r-- | contrib/binutils/bfd/elf.c | 38 |
2 files changed, 40 insertions, 0 deletions
diff --git a/contrib/binutils/bfd/elf-bfd.h b/contrib/binutils/bfd/elf-bfd.h index f4c3a0a..6ac59e1 100644 --- a/contrib/binutils/bfd/elf-bfd.h +++ b/contrib/binutils/bfd/elf-bfd.h @@ -2003,6 +2003,8 @@ extern char * elfcore_write_pstatus (bfd *, char *, int *, long, int, const void *); extern char *elfcore_write_prfpreg (bfd *, char *, int *, const void *, int); +extern char *elfcore_write_thrmisc + (bfd *, char *, int *, const char *, int); extern char *elfcore_write_prxfpreg (bfd *, char *, int *, const void *, int); extern char *elfcore_write_lwpstatus diff --git a/contrib/binutils/bfd/elf.c b/contrib/binutils/bfd/elf.c index e819609..c4e3d80 100644 --- a/contrib/binutils/bfd/elf.c +++ b/contrib/binutils/bfd/elf.c @@ -7443,6 +7443,12 @@ _bfd_elf_rel_vtable_reloc_fn #ifdef HAVE_SYS_PROCFS_H # include <sys/procfs.h> + +/* Define HAVE_THRMISC_T for consistency with other similar GNU-type stubs. */ +#undef HAVE_THRMISC_T +#if defined (THRMISC_VERSION) +#define HAVE_THRMISC_T 1 +#endif #endif /* FIXME: this is kinda wrong, but it's what gdb wants. */ @@ -7623,6 +7629,16 @@ elfcore_grok_prxfpreg (bfd *abfd, Elf_Internal_Note *note) return elfcore_make_note_pseudosection (abfd, ".reg-xfp", note); } +#if defined (HAVE_THRMISC_T) + +static bfd_boolean +elfcore_grok_thrmisc (bfd *abfd, Elf_Internal_Note *note) +{ + return elfcore_make_note_pseudosection (abfd, ".tname", note); +} + +#endif /* defined (HAVE_THRMISC_T) */ + #if defined (HAVE_PRPSINFO_T) typedef prpsinfo_t elfcore_psinfo_t; #if defined (HAVE_PRPSINFO32_T) /* Sparc64 cross Sparc32 */ @@ -7986,6 +8002,12 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note) return TRUE; } + +#if defined (HAVE_THRMISC_T) + case NT_THRMISC: + return elfcore_grok_thrmisc (abfd, note); +#endif + } } @@ -8451,6 +8473,22 @@ elfcore_write_prfpreg (bfd *abfd, } char * +elfcore_write_thrmisc (bfd *abfd, + char *buf, + int *bufsiz, + const char *tname, + int size) +{ +#if defined (HAVE_THRMISC_T) + char *note_name = "CORE"; + return elfcore_write_note (abfd, buf, bufsiz, + note_name, NT_THRMISC, tname, size); +#else + return buf; +#endif +} + +char * elfcore_write_prxfpreg (bfd *abfd, char *buf, int *bufsiz, |