Patchwork [1/2] Support AT_HWCAP2 on FreeBSD.

login
register
mail settings
Submitter John Baldwin
Date Oct. 8, 2018, 10:53 p.m.
Message ID <20181008225319.87243-1-jhb@FreeBSD.org>
Download mbox | patch
Permalink /patch/29674/
State New
Headers show

Comments

John Baldwin - Oct. 8, 2018, 10:53 p.m.
include/ChangeLog:

	* elf/common.h (AT_FREEBSD_HWCAP2): Define.

gdb/ChangeLog:

	* fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
---
 gdb/ChangeLog        | 4 ++++
 gdb/fbsd-tdep.c      | 1 +
 include/ChangeLog    | 4 ++++
 include/elf/common.h | 1 +
 4 files changed, 10 insertions(+)

Patch

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f074385c30..24aeb467b1 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@ 
+2018-10-08  John Baldwin  <jhb@FreeBSD.org>
+
+	* fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
+
 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
 
 	* Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
diff --git a/gdb/fbsd-tdep.c b/gdb/fbsd-tdep.c
index 070d448b4e..e948f28abc 100644
--- a/gdb/fbsd-tdep.c
+++ b/gdb/fbsd-tdep.c
@@ -1504,6 +1504,7 @@  fbsd_print_auxv_entry (struct gdbarch *gdbarch, struct ui_file *file,
       TAG (STACKPROT, _("Initial stack protection"), AUXV_FORMAT_HEX);
       TAG (EHDRFLAGS, _("ELF header e_flags"), AUXV_FORMAT_HEX);
       TAG (HWCAP, _("Machine-dependent CPU capability hints"), AUXV_FORMAT_HEX);
+      TAG (HWCAP2, _("Extension of AT_HWCAP"), AUXV_FORMAT_HEX);
     default:
       default_print_auxv_entry (gdbarch, file, type, val);
       return;
diff --git a/include/ChangeLog b/include/ChangeLog
index ce95a61662..7dba7c9557 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@ 
+2018-10-08  John Baldwin  <jhb@FreeBSD.org>
+
+	* elf/common.h (AT_FREEBSD_HWCAP2): Define.
+
 2018-10-08  Alan Modra  <amodra@gmail.com>
 
 	* bfdlink.h (struct bfd_link_info): Add load_phdrs field.
diff --git a/include/elf/common.h b/include/elf/common.h
index e194274305..da9ea036f4 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -1226,6 +1226,7 @@ 
 #define AT_FREEBSD_STACKPROT    23      /* Initial stack protection. */
 #define AT_FREEBSD_EHDRFLAGS    24      /* e_flags field from ELF header. */
 #define AT_FREEBSD_HWCAP        25      /* CPU feature flags. */
+#define AT_FREEBSD_HWCAP2       26      /* CPU feature flags 2. */
 
 #define AT_SUN_UID      2000    /* Effective user ID.  */
 #define AT_SUN_RUID     2001    /* Real user ID.  */