* [PATCH] Support for NT_PPC_VMX in BFD and readelf
@ 2007-10-19 19:36 Carlos Eduardo Seo
2007-10-20 21:49 ` Alan Modra
0 siblings, 1 reply; 2+ messages in thread
From: Carlos Eduardo Seo @ 2007-10-19 19:36 UTC (permalink / raw)
To: binutils
[-- Attachment #1: Type: text/plain, Size: 564 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
This patch provides support in BFD and readelf for the new note
NT_PPC_VMX added by Roland McGrath here:
http://sourceware.org/ml/binutils/2007-10/msg00261.html
Is it OK?
Thanks and regards,
- --
Carlos Eduardo Seo
Software Engineer
IBM Linux Technology Center
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHGQZKqvq7Aov/qQARAmjrAJ9GxzOTjzJ2bAYX7R9USl0q05LB5gCeLQ8l
O3FdeAJYM6jmhAf1ATsKbEs=
=Falj
-----END PGP SIGNATURE-----
[-- Attachment #2: nt_altivec.diff --]
[-- Type: text/x-patch, Size: 2897 bytes --]
2007-10-19 Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
* bfd/elf.c (elfcore_grok_ppc_vmx): Added.
(elfcore_grok_note): Added note NT_PPC_VMX.
(elfcore_write_ppc_vmx): Added.
* bfd/elf-bfd.h (elfcore_write_ppc_vmx): Declare.
* binutils/readelf.c (get_note_type): Added note
NT_PPC_VMX
Index: src/bfd/elf.c
===================================================================
--- src.orig/bfd/elf.c 2007-10-19 13:35:11.000000000 +0000
+++ src/bfd/elf.c 2007-10-19 13:37:44.000000000 +0000
@@ -7449,6 +7449,13 @@
return elfcore_make_note_pseudosection (abfd, ".reg-xfp", note);
}
+static bfd_boolean
+elfcore_grok_ppc_vmx (bfd *abfd, Elf_Internal_Note *note)
+{
+ return elfcore_make_note_pseudosection (abfd, ".reg-ppc-vmx", note);
+}
+
+
#if defined (HAVE_PRPSINFO_T)
typedef prpsinfo_t elfcore_psinfo_t;
#if defined (HAVE_PRPSINFO32_T) /* Sparc64 cross Sparc32 */
@@ -7796,6 +7803,13 @@
else
return TRUE;
+ case NT_PPC_VMX:
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
+ return elfcore_grok_ppc_vmx (abfd, note);
+ else
+ return TRUE;
+
case NT_PRPSINFO:
case NT_PSINFO:
if (bed->elf_backend_grok_psinfo)
@@ -8350,6 +8364,18 @@
note_name, NT_PRXFPREG, xfpregs, size);
}
+char *
+elfcore_write_ppc_vmx (bfd *abfd,
+ char *buf,
+ int *bufsiz,
+ const void *ppc_vmx,
+ int size)
+{
+ char *note_name = "LINUX";
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, NT_PPC_VMX, ppc_vmx, size);
+}
+
static bfd_boolean
elf_parse_notes (bfd *abfd, char *buf, size_t size, file_ptr offset)
{
Index: src/bfd/elf-bfd.h
===================================================================
--- src.orig/bfd/elf-bfd.h 2007-10-19 13:46:28.000000000 +0000
+++ src/bfd/elf-bfd.h 2007-10-19 13:47:13.000000000 +0000
@@ -2009,6 +2009,8 @@
(bfd *, char *, int *, const void *, int);
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_lwpstatus
(bfd *, char *, int *, long, int, const void *);
Index: src/binutils/readelf.c
===================================================================
--- src.orig/binutils/readelf.c 2007-10-19 16:18:17.000000000 +0000
+++ src/binutils/readelf.c 2007-10-19 16:20:18.000000000 +0000
@@ -9280,6 +9280,8 @@
return _("NT_TASKSTRUCT (task structure)");
case NT_PRXFPREG:
return _("NT_PRXFPREG (user_xfpregs structure)");
+ case NT_PPC_VMX:
+ return _("NT_PPC_VMX (ppc Altivec registers)");
case NT_PSTATUS:
return _("NT_PSTATUS (pstatus structure)");
case NT_FPREGS:
[-- Attachment #3: nt_altivec.diff.sig --]
[-- Type: application/octet-stream, Size: 65 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Support for NT_PPC_VMX in BFD and readelf
2007-10-19 19:36 [PATCH] Support for NT_PPC_VMX in BFD and readelf Carlos Eduardo Seo
@ 2007-10-20 21:49 ` Alan Modra
0 siblings, 0 replies; 2+ messages in thread
From: Alan Modra @ 2007-10-20 21:49 UTC (permalink / raw)
To: Carlos Eduardo Seo; +Cc: binutils
On Fri, Oct 19, 2007 at 05:32:27PM -0200, Carlos Eduardo Seo wrote:
> * bfd/elf.c (elfcore_grok_ppc_vmx): Added.
> (elfcore_grok_note): Added note NT_PPC_VMX.
> (elfcore_write_ppc_vmx): Added.
> * bfd/elf-bfd.h (elfcore_write_ppc_vmx): Declare.
> * binutils/readelf.c (get_note_type): Added note
> NT_PPC_VMX
OK.
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-10-20 1:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-19 19:36 [PATCH] Support for NT_PPC_VMX in BFD and readelf Carlos Eduardo Seo
2007-10-20 21:49 ` Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).