* bfd/elf-bfd.h: Declare elfcore_write_ppc_vsx.
* bfd/elf.c (elfcore_grok_ppc_vsx): New function. (elfcore_write_ppc_vsx): New function (elfcore_grok_note): Handle VSX notes. (elfcore_write_register_note): Handle VSX notes. * include/elf/common.h: Define NT_PPC_VSX. * binutils/readelf.c (get_note_type): Handle VSX notes.
This commit is contained in:
parent
a366c65aeb
commit
89eeb0bc23
7 changed files with 48 additions and 0 deletions
|
@ -1,3 +1,11 @@
|
|||
2008-07-21 Luis Machado <luisgpm@br.ibm.com>
|
||||
|
||||
* elf-bfd.h: Declare elfcore_write_ppc_vsx.
|
||||
* elf.c (elfcore_grok_ppc_vsx): New function.
|
||||
(elfcore_write_ppc_vsx): New function
|
||||
(elfcore_grok_note): Handle VSX notes.
|
||||
(elfcore_write_register_note): Handle VSX notes.
|
||||
|
||||
2008-07-18 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* bfd-in.h (bfd_elf32_arm_set_target_relocs): Add new parameter.
|
||||
|
|
|
@ -2141,6 +2141,8 @@ extern char *elfcore_write_prxfpreg
|
|||
(bfd *, char *, int *, const void *, int);
|
||||
extern char *elfcore_write_ppc_vmx
|
||||
(bfd *, char *, int *, const void *, int);
|
||||
extern char *elfcore_write_ppc_vsx
|
||||
(bfd *, char *, int *, const void *, int);
|
||||
extern char *elfcore_write_lwpstatus
|
||||
(bfd *, char *, int *, long, int, const void *);
|
||||
extern char *elfcore_write_register_note
|
||||
|
|
26
bfd/elf.c
26
bfd/elf.c
|
@ -7553,6 +7553,11 @@ elfcore_grok_ppc_vmx (bfd *abfd, Elf_Internal_Note *note)
|
|||
return elfcore_make_note_pseudosection (abfd, ".reg-ppc-vmx", note);
|
||||
}
|
||||
|
||||
static bfd_boolean
|
||||
elfcore_grok_ppc_vsx (bfd *abfd, Elf_Internal_Note *note)
|
||||
{
|
||||
return elfcore_make_note_pseudosection (abfd, ".reg-ppc-vsx", note);
|
||||
}
|
||||
|
||||
#if defined (HAVE_PRPSINFO_T)
|
||||
typedef prpsinfo_t elfcore_psinfo_t;
|
||||
|
@ -7908,6 +7913,13 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
|
|||
else
|
||||
return TRUE;
|
||||
|
||||
case NT_PPC_VSX:
|
||||
if (note->namesz == 6
|
||||
&& strcmp (note->namedata, "LINUX") == 0)
|
||||
return elfcore_grok_ppc_vsx (abfd, note);
|
||||
else
|
||||
return TRUE;
|
||||
|
||||
case NT_PRPSINFO:
|
||||
case NT_PSINFO:
|
||||
if (bed->elf_backend_grok_psinfo)
|
||||
|
@ -8474,6 +8486,18 @@ elfcore_write_ppc_vmx (bfd *abfd,
|
|||
note_name, NT_PPC_VMX, ppc_vmx, size);
|
||||
}
|
||||
|
||||
char *
|
||||
elfcore_write_ppc_vsx (bfd *abfd,
|
||||
char *buf,
|
||||
int *bufsiz,
|
||||
const void *ppc_vsx,
|
||||
int size)
|
||||
{
|
||||
char *note_name = "LINUX";
|
||||
return elfcore_write_note (abfd, buf, bufsiz,
|
||||
note_name, NT_PPC_VSX, ppc_vsx, size);
|
||||
}
|
||||
|
||||
char *
|
||||
elfcore_write_register_note (bfd *abfd,
|
||||
char *buf,
|
||||
|
@ -8488,6 +8512,8 @@ elfcore_write_register_note (bfd *abfd,
|
|||
return elfcore_write_prxfpreg (abfd, buf, bufsiz, data, size);
|
||||
if (strcmp (section, ".reg-ppc-vmx") == 0)
|
||||
return elfcore_write_ppc_vmx (abfd, buf, bufsiz, data, size);
|
||||
if (strcmp (section, ".reg-ppc-vsx") == 0)
|
||||
return elfcore_write_ppc_vsx (abfd, buf, bufsiz, data, size);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2008-07-21 Luis Machado <luisgpm@br.ibm.com>
|
||||
|
||||
* readelf.c (get_note_type): Handle VSX notes.
|
||||
|
||||
2008-07-15 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* objdump.c (load_debug_section): Initialize section_is_compressed
|
||||
|
|
|
@ -9929,6 +9929,8 @@ get_note_type (unsigned e_type)
|
|||
return _("NT_PRXFPREG (user_xfpregs structure)");
|
||||
case NT_PPC_VMX:
|
||||
return _("NT_PPC_VMX (ppc Altivec registers)");
|
||||
case NT_PPC_VSX:
|
||||
return _("NT_PPC_VSX (ppc VSX registers)");
|
||||
case NT_PSTATUS:
|
||||
return _("NT_PSTATUS (pstatus structure)");
|
||||
case NT_FPREGS:
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2008-07-21 Luis Machado <luisgpm@br.ibm.com>
|
||||
|
||||
* common.h: Define NT_PPC_VSX.
|
||||
|
||||
2008-07-10 Richard Sandiford <rdsandiford@googlemail.com>
|
||||
|
||||
* mips.h (ELF_ST_IS_MIPS16, ELF_ST_SET_MIPS16): New macros.
|
||||
|
|
|
@ -443,6 +443,8 @@
|
|||
/* note name must be "LINUX". */
|
||||
#define NT_PPC_VMX 0x100 /* PowerPC Altivec/VMX registers */
|
||||
/* note name must be "LINUX". */
|
||||
#define NT_PPC_VSX 0x102 /* PowerPC VSX registers */
|
||||
/* note name must be "LINUX". */
|
||||
|
||||
/* Note segments for core files on dir-style procfs systems. */
|
||||
|
||||
|
|
Loading…
Reference in a new issue