Index: contrib/binutils/bfd/elf.c =================================================================== --- contrib/binutils/bfd/elf.c (revision 214764) +++ contrib/binutils/bfd/elf.c (working copy) @@ -6402,6 +6402,10 @@ { size_t raw_size; int offset; +#if PRSTATUS_VERSION >= 2 + size_t tname_raw_size; + int tname_offset; +#endif if (note->descsz == sizeof (prstatus_t)) { @@ -6409,6 +6413,10 @@ raw_size = sizeof (prstat.pr_reg); offset = offsetof (prstatus_t, pr_reg); +#if PRSTATUS_VERSION >= 2 + tname_raw_size = sizeof (prstat.pr_tname); + tname_offset = offsetof (prstatus_t, pr_tname); +#endif memcpy (&prstat, note->descdata, sizeof (prstat)); /* Do not overwrite the core signal if it @@ -6435,6 +6443,10 @@ raw_size = sizeof (prstat.pr_reg); offset = offsetof (prstatus32_t, pr_reg); +#if PRSTATUS_VERSION >= 2 + tname_raw_size = sizeof (prstat.pr_tname); + tname_offset = offsetof (prstatus32_t, pr_tname); +#endif memcpy (&prstat, note->descdata, sizeof (prstat)); /* Do not overwrite the core signal if it @@ -6464,6 +6476,13 @@ /* Make a ".reg/999" section and a ".reg" section. */ return _bfd_elfcore_make_pseudosection (abfd, ".reg", raw_size, note->descpos + offset); + +#if PRSTATUS_VERSION >= 2 + /* Make a ".tname/999" section and a ".tname" section. */ + return _bfd_elfcore_make_pseudosection (abfd, ".tname", + tname_raw_size, + note->descpos + tname_offset); +#endif } #endif /* defined (HAVE_PRSTATUS_T) */