aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2011-06-15 16:36:58 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2011-06-15 16:36:58 +0000
commitfaa9a424ea76bdfd223e89b87f479297564a4e05 (patch)
tree01029aea3edab4e32a9daec5c2ff1fe41aa64aad /bfd/elf.c
parent48f4b4f592b16d767bb94b0ce40712f6a04f9f95 (diff)
downloadgdb-faa9a424ea76bdfd223e89b87f479297564a4e05.zip
gdb-faa9a424ea76bdfd223e89b87f479297564a4e05.tar.gz
gdb-faa9a424ea76bdfd223e89b87f479297564a4e05.tar.bz2
include/elf/
* common.h (NT_ARM_VFP): Define. bfd/ * elf-bfd.h (elfcore_write_arm_vfp): Add prototype. * elf.c (elfcore_grok_arm_vfp): New function. (elfcore_grok_note): Call it to handle NT_ARM_VFP notes. (elfcore_write_arm_vfp): New function. (elfcore_write_register_note): Call it to handle .reg-arm-vfp. binutils/ * readelf.c (get_note_type): Handle NT_ARM_VFP.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 4664c58..15e0cd3 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -7976,6 +7976,12 @@ elfcore_grok_s390_prefix (bfd *abfd, Elf_Internal_Note *note)
return elfcore_make_note_pseudosection (abfd, ".reg-s390-prefix", note);
}
+static bfd_boolean
+elfcore_grok_arm_vfp (bfd *abfd, Elf_Internal_Note *note)
+{
+ return elfcore_make_note_pseudosection (abfd, ".reg-arm-vfp", note);
+}
+
#if defined (HAVE_PRPSINFO_T)
typedef prpsinfo_t elfcore_psinfo_t;
#if defined (HAVE_PRPSINFO32_T) /* Sparc64 cross Sparc32 */
@@ -8395,6 +8401,13 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
else
return TRUE;
+ case NT_ARM_VFP:
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
+ return elfcore_grok_arm_vfp (abfd, note);
+ else
+ return TRUE;
+
case NT_PRPSINFO:
case NT_PSINFO:
if (bed->elf_backend_grok_psinfo)
@@ -9149,6 +9162,18 @@ elfcore_write_s390_prefix (bfd *abfd,
}
char *
+elfcore_write_arm_vfp (bfd *abfd,
+ char *buf,
+ int *bufsiz,
+ const void *arm_vfp,
+ int size)
+{
+ char *note_name = "LINUX";
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, NT_ARM_VFP, arm_vfp, size);
+}
+
+char *
elfcore_write_register_note (bfd *abfd,
char *buf,
int *bufsiz,
@@ -9178,6 +9203,8 @@ elfcore_write_register_note (bfd *abfd,
return elfcore_write_s390_ctrs (abfd, buf, bufsiz, data, size);
if (strcmp (section, ".reg-s390-prefix") == 0)
return elfcore_write_s390_prefix (abfd, buf, bufsiz, data, size);
+ if (strcmp (section, ".reg-arm-vfp") == 0)
+ return elfcore_write_arm_vfp (abfd, buf, bufsiz, data, size);
return NULL;
}