* [Patch, ARM/AArch64] Add new elf note types
@ 2012-11-15 16:29 Yufeng Zhang
2012-11-21 17:20 ` Richard Earnshaw
0 siblings, 1 reply; 4+ messages in thread
From: Yufeng Zhang @ 2012-11-15 16:29 UTC (permalink / raw)
To: binutils
[-- Attachment #1: Type: text/plain, Size: 1217 bytes --]
Hi,
This patch adds support for three ARM elf note types in bfd and readelf.
Is it OK to commit it?
Thanks,
Yufeng
include/elf/
2012-11-15 Yufeng Zhang <yufeng.zhang@arm.com>
* common.h (NT_ARM_TLS, NT_ARM_HW_BREAK, NT_ARM_HW_WATCH): New
macro
definitions.
bfd/
2012-11-15 Yufeng Zhang <yufeng.zhang@arm.com>
* elf-bfd.h (elfcore_write_arm_tls): Add prototype.
(elfcore_write_arm_hw_break): Likewise.
(elfcore_write_arm_hw_watch): Likewise.
* elf.c (elfcore_grok_arm_tls): New function.
(elfcore_grok_arm_hw_break): Likewise.
(elfcore_grok_arm_hw_watch): Likewise.
(elfcore_grok_note): Call the new functions to handle the
corresponding notes.
(elfcore_write_arm_tls): New function.
(elfcore_write_arm_hw_break): Likewise.
(elfcore_write_arm_hw_watch): Likewise.
(elfcore_write_register_note): Call the new functions to handle the
corresponding pseudo sections.
binutils/
2012-11-15 Yufeng Zhang <yufeng.zhang@arm.com>
* readelf.c (get_note_type): Handle NT_ARM_TLS, NT_ARM_HW_BREAK
and NT_ARM_HW_WATCH.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: aarch64-new-elf-note-types.patch --]
[-- Type: text/x-patch; name=aarch64-new-elf-note-types.patch, Size: 5449 bytes --]
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index b8d82b1..9d42f44 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -2269,6 +2269,12 @@ extern char *elfcore_write_s390_system_call
(bfd *, char *, int *, const void *, int);
extern char *elfcore_write_arm_vfp
(bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_arm_tls
+ (bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_arm_hw_break
+ (bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_arm_hw_watch
+ (bfd *, char *, int *, const void *, int);
extern char *elfcore_write_lwpstatus
(bfd *, char *, int *, long, int, const void *);
extern char *elfcore_write_register_note
diff --git a/bfd/elf.c b/bfd/elf.c
index cab1cc7..2bb243d 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -8140,6 +8140,24 @@ elfcore_grok_arm_vfp (bfd *abfd, Elf_Internal_Note *note)
return elfcore_make_note_pseudosection (abfd, ".reg-arm-vfp", note);
}
+static bfd_boolean
+elfcore_grok_arm_tls (bfd *abfd, Elf_Internal_Note *note)
+{
+ return elfcore_make_note_pseudosection (abfd, ".reg-arm-tls", note);
+}
+
+static bfd_boolean
+elfcore_grok_arm_hw_break (bfd *abfd, Elf_Internal_Note *note)
+{
+ return elfcore_make_note_pseudosection (abfd, ".reg-arm-hw-break", note);
+}
+
+static bfd_boolean
+elfcore_grok_arm_hw_watch (bfd *abfd, Elf_Internal_Note *note)
+{
+ return elfcore_make_note_pseudosection (abfd, ".reg-arm-hw-watch", note);
+}
+
#if defined (HAVE_PRPSINFO_T)
typedef prpsinfo_t elfcore_psinfo_t;
#if defined (HAVE_PRPSINFO32_T) /* Sparc64 cross Sparc32 */
@@ -8580,6 +8598,27 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
else
return TRUE;
+ case NT_ARM_TLS:
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
+ return elfcore_grok_arm_tls (abfd, note);
+ else
+ return TRUE;
+
+ case NT_ARM_HW_BREAK:
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
+ return elfcore_grok_arm_hw_break (abfd, note);
+ else
+ return TRUE;
+
+ case NT_ARM_HW_WATCH:
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
+ return elfcore_grok_arm_hw_watch (abfd, note);
+ else
+ return TRUE;
+
case NT_PRPSINFO:
case NT_PSINFO:
if (bed->elf_backend_grok_psinfo)
@@ -9376,6 +9415,42 @@ elfcore_write_arm_vfp (bfd *abfd,
}
char *
+elfcore_write_arm_tls (bfd *abfd,
+ char *buf,
+ int *bufsiz,
+ const void *arm_tls,
+ int size)
+{
+ char *note_name = "LINUX";
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, NT_ARM_TLS, arm_tls, size);
+}
+
+char *
+elfcore_write_arm_hw_break (bfd *abfd,
+ char *buf,
+ int *bufsiz,
+ const void *arm_hw_break,
+ int size)
+{
+ char *note_name = "LINUX";
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, NT_ARM_HW_BREAK, arm_hw_break, size);
+}
+
+char *
+elfcore_write_arm_hw_watch (bfd *abfd,
+ char *buf,
+ int *bufsiz,
+ const void *arm_hw_watch,
+ int size)
+{
+ char *note_name = "LINUX";
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, NT_ARM_HW_WATCH, arm_hw_watch, size);
+}
+
+char *
elfcore_write_register_note (bfd *abfd,
char *buf,
int *bufsiz,
@@ -9411,6 +9486,12 @@ elfcore_write_register_note (bfd *abfd,
return elfcore_write_s390_system_call (abfd, buf, bufsiz, data, size);
if (strcmp (section, ".reg-arm-vfp") == 0)
return elfcore_write_arm_vfp (abfd, buf, bufsiz, data, size);
+ if (strcmp (section, ".reg-arm-tls") == 0)
+ return elfcore_write_arm_tls (abfd, buf, bufsiz, data, size);
+ if (strcmp (section, ".reg-arm-hw-break") == 0)
+ return elfcore_write_arm_hw_break (abfd, buf, bufsiz, data, size);
+ if (strcmp (section, ".reg-arm-hw-watch") == 0)
+ return elfcore_write_arm_hw_watch (abfd, buf, bufsiz, data, size);
return NULL;
}
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 2fbf2ae..1a52130 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -12600,6 +12600,12 @@ get_note_type (unsigned e_type)
return _("NT_S390_PREFIX (s390 prefix register)");
case NT_ARM_VFP:
return _("NT_ARM_VFP (arm VFP registers)");
+ case NT_ARM_TLS:
+ return _("NT_ARM_TLS (arm TLS registers)");
+ case NT_ARM_HW_BREAK:
+ return _("NT_ARM_HW_BREAK (arm hardware breakpoint registers)");
+ case NT_ARM_HW_WATCH:
+ return _("NT_ARM_HW_WATCH (arm hardware watchpoint registers)");
case NT_PSTATUS:
return _("NT_PSTATUS (pstatus structure)");
case NT_FPREGS:
diff --git a/include/elf/common.h b/include/elf/common.h
index 1c681d5..7814733 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -549,6 +549,12 @@
/* note name must be "LINUX". */
#define NT_ARM_VFP 0x400 /* ARM VFP registers */
/* note name must be "LINUX". */
+#define NT_ARM_TLS 0x401 /* ARM TLS registers */
+ /* note name must be "LINUX". */
+#define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */
+ /* note name must be "LINUX". */
+#define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */
+ /* note name must be "LINUX". */
/* Note segments for core files on dir-style procfs systems. */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Patch, ARM/AArch64] Add new elf note types
2012-11-15 16:29 [Patch, ARM/AArch64] Add new elf note types Yufeng Zhang
@ 2012-11-21 17:20 ` Richard Earnshaw
2013-01-08 16:48 ` Yufeng Zhang
0 siblings, 1 reply; 4+ messages in thread
From: Richard Earnshaw @ 2012-11-21 17:20 UTC (permalink / raw)
To: Yufeng Zhang; +Cc: binutils
On 15/11/12 16:29, Yufeng Zhang wrote:
> Hi,
>
> This patch adds support for three ARM elf note types in bfd and readelf.
>
> Is it OK to commit it?
>
> Thanks,
> Yufeng
>
I think all this should be using AArch64 (or the appropriate
capitalization of it), not ARM.
R.
>
> include/elf/
>
> 2012-11-15 Yufeng Zhang <yufeng.zhang@arm.com>
>
> * common.h (NT_ARM_TLS, NT_ARM_HW_BREAK, NT_ARM_HW_WATCH): New
> macro
> definitions.
>
> bfd/
>
> 2012-11-15 Yufeng Zhang <yufeng.zhang@arm.com>
>
> * elf-bfd.h (elfcore_write_arm_tls): Add prototype.
> (elfcore_write_arm_hw_break): Likewise.
> (elfcore_write_arm_hw_watch): Likewise.
> * elf.c (elfcore_grok_arm_tls): New function.
> (elfcore_grok_arm_hw_break): Likewise.
> (elfcore_grok_arm_hw_watch): Likewise.
> (elfcore_grok_note): Call the new functions to handle the
> corresponding notes.
> (elfcore_write_arm_tls): New function.
> (elfcore_write_arm_hw_break): Likewise.
> (elfcore_write_arm_hw_watch): Likewise.
> (elfcore_write_register_note): Call the new functions to handle
> the
> corresponding pseudo sections.
>
> binutils/
>
> 2012-11-15 Yufeng Zhang <yufeng.zhang@arm.com>
>
> * readelf.c (get_note_type): Handle NT_ARM_TLS, NT_ARM_HW_BREAK
> and NT_ARM_HW_WATCH.
>
> aarch64-new-elf-note-types.patch
>
>
> diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
> index b8d82b1..9d42f44 100644
> --- a/bfd/elf-bfd.h
> +++ b/bfd/elf-bfd.h
> @@ -2269,6 +2269,12 @@ extern char *elfcore_write_s390_system_call
> (bfd *, char *, int *, const void *, int);
> extern char *elfcore_write_arm_vfp
> (bfd *, char *, int *, const void *, int);
> +extern char *elfcore_write_arm_tls
> + (bfd *, char *, int *, const void *, int);
> +extern char *elfcore_write_arm_hw_break
> + (bfd *, char *, int *, const void *, int);
> +extern char *elfcore_write_arm_hw_watch
> + (bfd *, char *, int *, const void *, int);
> extern char *elfcore_write_lwpstatus
> (bfd *, char *, int *, long, int, const void *);
> extern char *elfcore_write_register_note
> diff --git a/bfd/elf.c b/bfd/elf.c
> index cab1cc7..2bb243d 100644
> --- a/bfd/elf.c
> +++ b/bfd/elf.c
> @@ -8140,6 +8140,24 @@ elfcore_grok_arm_vfp (bfd *abfd, Elf_Internal_Note *note)
> return elfcore_make_note_pseudosection (abfd, ".reg-arm-vfp", note);
> }
>
> +static bfd_boolean
> +elfcore_grok_arm_tls (bfd *abfd, Elf_Internal_Note *note)
> +{
> + return elfcore_make_note_pseudosection (abfd, ".reg-arm-tls", note);
> +}
> +
> +static bfd_boolean
> +elfcore_grok_arm_hw_break (bfd *abfd, Elf_Internal_Note *note)
> +{
> + return elfcore_make_note_pseudosection (abfd, ".reg-arm-hw-break", note);
> +}
> +
> +static bfd_boolean
> +elfcore_grok_arm_hw_watch (bfd *abfd, Elf_Internal_Note *note)
> +{
> + return elfcore_make_note_pseudosection (abfd, ".reg-arm-hw-watch", note);
> +}
> +
> #if defined (HAVE_PRPSINFO_T)
> typedef prpsinfo_t elfcore_psinfo_t;
> #if defined (HAVE_PRPSINFO32_T) /* Sparc64 cross Sparc32 */
> @@ -8580,6 +8598,27 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
> else
> return TRUE;
>
> + case NT_ARM_TLS:
> + if (note->namesz == 6
> + && strcmp (note->namedata, "LINUX") == 0)
> + return elfcore_grok_arm_tls (abfd, note);
> + else
> + return TRUE;
> +
> + case NT_ARM_HW_BREAK:
> + if (note->namesz == 6
> + && strcmp (note->namedata, "LINUX") == 0)
> + return elfcore_grok_arm_hw_break (abfd, note);
> + else
> + return TRUE;
> +
> + case NT_ARM_HW_WATCH:
> + if (note->namesz == 6
> + && strcmp (note->namedata, "LINUX") == 0)
> + return elfcore_grok_arm_hw_watch (abfd, note);
> + else
> + return TRUE;
> +
> case NT_PRPSINFO:
> case NT_PSINFO:
> if (bed->elf_backend_grok_psinfo)
> @@ -9376,6 +9415,42 @@ elfcore_write_arm_vfp (bfd *abfd,
> }
>
> char *
> +elfcore_write_arm_tls (bfd *abfd,
> + char *buf,
> + int *bufsiz,
> + const void *arm_tls,
> + int size)
> +{
> + char *note_name = "LINUX";
> + return elfcore_write_note (abfd, buf, bufsiz,
> + note_name, NT_ARM_TLS, arm_tls, size);
> +}
> +
> +char *
> +elfcore_write_arm_hw_break (bfd *abfd,
> + char *buf,
> + int *bufsiz,
> + const void *arm_hw_break,
> + int size)
> +{
> + char *note_name = "LINUX";
> + return elfcore_write_note (abfd, buf, bufsiz,
> + note_name, NT_ARM_HW_BREAK, arm_hw_break, size);
> +}
> +
> +char *
> +elfcore_write_arm_hw_watch (bfd *abfd,
> + char *buf,
> + int *bufsiz,
> + const void *arm_hw_watch,
> + int size)
> +{
> + char *note_name = "LINUX";
> + return elfcore_write_note (abfd, buf, bufsiz,
> + note_name, NT_ARM_HW_WATCH, arm_hw_watch, size);
> +}
> +
> +char *
> elfcore_write_register_note (bfd *abfd,
> char *buf,
> int *bufsiz,
> @@ -9411,6 +9486,12 @@ elfcore_write_register_note (bfd *abfd,
> return elfcore_write_s390_system_call (abfd, buf, bufsiz, data, size);
> if (strcmp (section, ".reg-arm-vfp") == 0)
> return elfcore_write_arm_vfp (abfd, buf, bufsiz, data, size);
> + if (strcmp (section, ".reg-arm-tls") == 0)
> + return elfcore_write_arm_tls (abfd, buf, bufsiz, data, size);
> + if (strcmp (section, ".reg-arm-hw-break") == 0)
> + return elfcore_write_arm_hw_break (abfd, buf, bufsiz, data, size);
> + if (strcmp (section, ".reg-arm-hw-watch") == 0)
> + return elfcore_write_arm_hw_watch (abfd, buf, bufsiz, data, size);
> return NULL;
> }
>
> diff --git a/binutils/readelf.c b/binutils/readelf.c
> index 2fbf2ae..1a52130 100644
> --- a/binutils/readelf.c
> +++ b/binutils/readelf.c
> @@ -12600,6 +12600,12 @@ get_note_type (unsigned e_type)
> return _("NT_S390_PREFIX (s390 prefix register)");
> case NT_ARM_VFP:
> return _("NT_ARM_VFP (arm VFP registers)");
> + case NT_ARM_TLS:
> + return _("NT_ARM_TLS (arm TLS registers)");
> + case NT_ARM_HW_BREAK:
> + return _("NT_ARM_HW_BREAK (arm hardware breakpoint registers)");
> + case NT_ARM_HW_WATCH:
> + return _("NT_ARM_HW_WATCH (arm hardware watchpoint registers)");
> case NT_PSTATUS:
> return _("NT_PSTATUS (pstatus structure)");
> case NT_FPREGS:
> diff --git a/include/elf/common.h b/include/elf/common.h
> index 1c681d5..7814733 100644
> --- a/include/elf/common.h
> +++ b/include/elf/common.h
> @@ -549,6 +549,12 @@
> /* note name must be "LINUX". */
> #define NT_ARM_VFP 0x400 /* ARM VFP registers */
> /* note name must be "LINUX". */
> +#define NT_ARM_TLS 0x401 /* ARM TLS registers */
> + /* note name must be "LINUX". */
> +#define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */
> + /* note name must be "LINUX". */
> +#define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */
> + /* note name must be "LINUX". */
>
> /* Note segments for core files on dir-style procfs systems. */
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Patch, ARM/AArch64] Add new elf note types
2012-11-21 17:20 ` Richard Earnshaw
@ 2013-01-08 16:48 ` Yufeng Zhang
2013-01-08 16:56 ` Richard Earnshaw
0 siblings, 1 reply; 4+ messages in thread
From: Yufeng Zhang @ 2013-01-08 16:48 UTC (permalink / raw)
To: Richard Earnshaw; +Cc: binutils, Marcus Shawcroft
[-- Attachment #1: Type: text/plain, Size: 1609 bytes --]
Hi,
Please find the updated patch and change log which have incorporated
changes discussed offline.
Is it OK to commit?
Thanks,
Yufeng
On 21/11/12 17:20, Richard Earnshaw wrote:
> On 15/11/12 16:29, Yufeng Zhang wrote:
>> Hi,
>>
>> This patch adds support for three ARM elf note types in bfd and readelf.
>>
>> Is it OK to commit it?
>>
>> Thanks,
>> Yufeng
>>
>
> I think all this should be using AArch64 (or the appropriate
> capitalization of it), not ARM.
>
> R.
include/elf/
2013-01-09 Yufeng Zhang <yufeng.zhang@arm.com>
* common.h (NT_ARM_TLS, NT_ARM_HW_BREAK, NT_ARM_HW_WATCH): New
macro
definitions.
bfd/
2013-01-09 Yufeng Zhang <yufeng.zhang@arm.com>
* elf-bfd.h (elfcore_write_aarch_tls): Add prototype.
(elfcore_write_aarch_hw_break): Likewise.
(elfcore_write_aarch_hw_watch): Likewise.
* elf.c (elfcore_grok_aarch_tls): New function.
(elfcore_grok_aarch_hw_break): Likewise.
(elfcore_grok_aarch_hw_watch): Likewise.
(elfcore_grok_note): Call the new functions to handle the
corresponding notes.
(elfcore_write_aarch_tls): New function.
(elfcore_write_aarch_hw_break): Likewise.
(elfcore_write_aarch_hw_watch): Likewise.
(elfcore_write_register_note): Call the new functions to handle the
corresponding pseudo sections.
binutils/
2013-01-09 Yufeng Zhang <yufeng.zhang@arm.com>
* readelf.c (get_note_type): Handle NT_ARM_TLS, NT_ARM_HW_BREAK
and NT_ARM_HW_WATCH.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: note-types.patch --]
[-- Type: text/x-patch; name=note-types.patch, Size: 5768 bytes --]
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index b8d82b1..70ad05d 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -2269,6 +2269,12 @@ extern char *elfcore_write_s390_system_call
(bfd *, char *, int *, const void *, int);
extern char *elfcore_write_arm_vfp
(bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_aarch_tls
+ (bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_aarch_hw_break
+ (bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_aarch_hw_watch
+ (bfd *, char *, int *, const void *, int);
extern char *elfcore_write_lwpstatus
(bfd *, char *, int *, long, int, const void *);
extern char *elfcore_write_register_note
diff --git a/bfd/elf.c b/bfd/elf.c
index 17e9ad4..86312c3 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -8162,6 +8162,24 @@ elfcore_grok_arm_vfp (bfd *abfd, Elf_Internal_Note *note)
return elfcore_make_note_pseudosection (abfd, ".reg-arm-vfp", note);
}
+static bfd_boolean
+elfcore_grok_aarch_tls (bfd *abfd, Elf_Internal_Note *note)
+{
+ return elfcore_make_note_pseudosection (abfd, ".reg-aarch-tls", note);
+}
+
+static bfd_boolean
+elfcore_grok_aarch_hw_break (bfd *abfd, Elf_Internal_Note *note)
+{
+ return elfcore_make_note_pseudosection (abfd, ".reg-aarch-hw-break", note);
+}
+
+static bfd_boolean
+elfcore_grok_aarch_hw_watch (bfd *abfd, Elf_Internal_Note *note)
+{
+ return elfcore_make_note_pseudosection (abfd, ".reg-aarch-hw-watch", note);
+}
+
#if defined (HAVE_PRPSINFO_T)
typedef prpsinfo_t elfcore_psinfo_t;
#if defined (HAVE_PRPSINFO32_T) /* Sparc64 cross Sparc32 */
@@ -8602,6 +8620,27 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
else
return TRUE;
+ case NT_ARM_TLS:
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
+ return elfcore_grok_aarch_tls (abfd, note);
+ else
+ return TRUE;
+
+ case NT_ARM_HW_BREAK:
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
+ return elfcore_grok_aarch_hw_break (abfd, note);
+ else
+ return TRUE;
+
+ case NT_ARM_HW_WATCH:
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
+ return elfcore_grok_aarch_hw_watch (abfd, note);
+ else
+ return TRUE;
+
case NT_PRPSINFO:
case NT_PSINFO:
if (bed->elf_backend_grok_psinfo)
@@ -9406,6 +9445,42 @@ elfcore_write_arm_vfp (bfd *abfd,
}
char *
+elfcore_write_aarch_tls (bfd *abfd,
+ char *buf,
+ int *bufsiz,
+ const void *aarch_tls,
+ int size)
+{
+ char *note_name = "LINUX";
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, NT_ARM_TLS, aarch_tls, size);
+}
+
+char *
+elfcore_write_aarch_hw_break (bfd *abfd,
+ char *buf,
+ int *bufsiz,
+ const void *aarch_hw_break,
+ int size)
+{
+ char *note_name = "LINUX";
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, NT_ARM_HW_BREAK, aarch_hw_break, size);
+}
+
+char *
+elfcore_write_aarch_hw_watch (bfd *abfd,
+ char *buf,
+ int *bufsiz,
+ const void *aarch_hw_watch,
+ int size)
+{
+ char *note_name = "LINUX";
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, NT_ARM_HW_WATCH, aarch_hw_watch, size);
+}
+
+char *
elfcore_write_register_note (bfd *abfd,
char *buf,
int *bufsiz,
@@ -9441,6 +9516,12 @@ elfcore_write_register_note (bfd *abfd,
return elfcore_write_s390_system_call (abfd, buf, bufsiz, data, size);
if (strcmp (section, ".reg-arm-vfp") == 0)
return elfcore_write_arm_vfp (abfd, buf, bufsiz, data, size);
+ if (strcmp (section, ".reg-aarch-tls") == 0)
+ return elfcore_write_aarch_tls (abfd, buf, bufsiz, data, size);
+ if (strcmp (section, ".reg-aarch-hw-break") == 0)
+ return elfcore_write_aarch_hw_break (abfd, buf, bufsiz, data, size);
+ if (strcmp (section, ".reg-aarch-hw-watch") == 0)
+ return elfcore_write_aarch_hw_watch (abfd, buf, bufsiz, data, size);
return NULL;
}
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 7877539..b9990ec 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -12803,6 +12803,12 @@ get_note_type (unsigned e_type)
return _("NT_S390_PREFIX (s390 prefix register)");
case NT_ARM_VFP:
return _("NT_ARM_VFP (arm VFP registers)");
+ case NT_ARM_TLS:
+ return _("NT_ARM_TLS (AArch TLS registers)");
+ case NT_ARM_HW_BREAK:
+ return _("NT_ARM_HW_BREAK (AArch hardware breakpoint registers)");
+ case NT_ARM_HW_WATCH:
+ return _("NT_ARM_HW_WATCH (AArch hardware watchpoint registers)");
case NT_PSTATUS:
return _("NT_PSTATUS (pstatus structure)");
case NT_FPREGS:
diff --git a/include/elf/common.h b/include/elf/common.h
index 4399d02..f0c8df2 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -552,6 +552,15 @@
#define NT_S390_SYSTEM_CALL 0x307 /* S390 system call restart data */
/* note name must be "LINUX". */
#define NT_ARM_VFP 0x400 /* ARM VFP registers */
+#define NT_ARM_TLS 0x401 /* AArch TLS registers */
+ /* note name must be "LINUX". */
+ /* This and the following two
+ definitions should really be
+ NT_AARCH_..., but defined this way
+ for compatibility with Linux. */
+#define NT_ARM_HW_BREAK 0x402 /* AArch hardware breakpoint registers */
+ /* note name must be "LINUX". */
+#define NT_ARM_HW_WATCH 0x403 /* AArch hardware watchpoint registers */
/* note name must be "LINUX". */
#define NT_SIGINFO 0x53494749 /* Fields of siginfo_t. */
#define NT_FILE 0x46494c45 /* Description of mapped files. */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Patch, ARM/AArch64] Add new elf note types
2013-01-08 16:48 ` Yufeng Zhang
@ 2013-01-08 16:56 ` Richard Earnshaw
0 siblings, 0 replies; 4+ messages in thread
From: Richard Earnshaw @ 2013-01-08 16:56 UTC (permalink / raw)
To: Yufeng Zhang; +Cc: binutils, Marcus Shawcroft
On 08/01/13 16:48, Yufeng Zhang wrote:
> Hi,
>
> Please find the updated patch and change log which have incorporated
> changes discussed offline.
>
> Is it OK to commit?
>
> Thanks,
> Yufeng
>
>
>
Ok, but,
> --- a/include/elf/common.h
> +++ b/include/elf/common.h
> @@ -552,6 +552,15 @@
> #define NT_S390_SYSTEM_CALL 0x307 /* S390 system call restart data */
> /* note name must be "LINUX". */
> #define NT_ARM_VFP 0x400 /* ARM VFP registers */
> +#define NT_ARM_TLS 0x401 /* AArch TLS registers */
> + /* note name must be "LINUX". */
> + /* This and the following two
> + definitions should really be
> + NT_AARCH_..., but defined this way
> + for compatibility with Linux. */
Please put this comment before the definition of NT_ARM_TLS, and change
it to:
/* The following definitions should really use ...
R.
> +#define NT_ARM_HW_BREAK 0x402 /* AArch hardware breakpoint registers */
> + /* note name must be "LINUX". */
> +#define NT_ARM_HW_WATCH 0x403 /* AArch hardware watchpoint registers */
> /* note name must be "LINUX". */
> #define NT_SIGINFO 0x53494749 /* Fields of siginfo_t. */
> #define NT_FILE 0x46494c45 /* Description of mapped files. */
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-01-08 16:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-15 16:29 [Patch, ARM/AArch64] Add new elf note types Yufeng Zhang
2012-11-21 17:20 ` Richard Earnshaw
2013-01-08 16:48 ` Yufeng Zhang
2013-01-08 16:56 ` Richard Earnshaw
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).