diff mbox

[1/4] Handle FreeBSD-specific AT_EHDRFLAGS and AT_HWCAP auxiliary vector types.

Message ID 20170914151831.65362-2-jhb@FreeBSD.org
State New
Headers show

Commit Message

John Baldwin Sept. 14, 2017, 3:18 p.m. UTC
FreeBSD recently added two additional ELF auxiliary vectors.  FreeBSD's
AT_HWCAP uses a different number compared to AT_HWCAP on Linux as the
numerical value was already in use for a different vector on FreeBSD.

include/ChangeLog:

	* elf/common.h (AT_FREEBSD_EHDRFLAGS, AT_FREEBSD_HWCAP): Define.

gdb/ChangeLog:

	* fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
	AT_HWCAP.
---
 gdb/ChangeLog        | 5 +++++
 gdb/fbsd-tdep.c      | 2 ++
 include/ChangeLog    | 4 ++++
 include/elf/common.h | 2 ++
 4 files changed, 13 insertions(+)

Comments

Nick Clifton Oct. 5, 2017, 1:47 p.m. UTC | #1
Hi John,

> include/ChangeLog:
> 
> 	* elf/common.h (AT_FREEBSD_EHDRFLAGS, AT_FREEBSD_HWCAP): Define.

This change is approved.

Cheers
  Nick
diff mbox

Patch

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f88cd6e1a4..a32dceaea9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@ 
+2017-09-14  John Baldwin  <jhb@FreeBSD.org>
+
+	* fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
+	AT_HWCAP.
+
 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
 
 	* dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
diff --git a/gdb/fbsd-tdep.c b/gdb/fbsd-tdep.c
index 1908269632..85dad6be90 100644
--- a/gdb/fbsd-tdep.c
+++ b/gdb/fbsd-tdep.c
@@ -392,6 +392,8 @@  fbsd_print_auxv_entry (struct gdbarch *gdbarch, struct ui_file *file,
       TAG (PAGESIZESLEN, _("Number of pagesizes"), AUXV_FORMAT_DEC);
       TAG (TIMEKEEP, _("Pointer to timehands"), AUXV_FORMAT_HEX);
       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);
     default:
       default_print_auxv_entry (gdbarch, file, type, val);
       return;
diff --git a/include/ChangeLog b/include/ChangeLog
index 3b6cea9664..28d6a5cda3 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@ 
+2016-09-14  John Baldwin  <jhb@FreeBSD.org>
+
+	* elf/common.h (AT_FREEBSD_EHDRFLAGS, AT_FREEBSD_HWCAP): Define.
+
 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
 
 	* opcode/nds32.h: Rename __BIT() to N32_BIT().
diff --git a/include/elf/common.h b/include/elf/common.h
index d08731cca1..f89ab32889 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -1144,6 +1144,8 @@ 
 #define AT_FREEBSD_PAGESIZESLEN 21      /* Number of pagesizes. */
 #define AT_FREEBSD_TIMEKEEP     22      /* Pointer to timehands. */
 #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_SUN_UID      2000    /* Effective user ID.  */
 #define AT_SUN_RUID     2001    /* Real user ID.  */