This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] Add AT_HWCAP2 auxv tag
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: gdb-patches at sourceware dot org, binutils at sourceware dot org
- Date: Tue, 28 Jan 2014 18:11:40 +0100 (CET)
- Subject: [PATCH] Add AT_HWCAP2 auxv tag
- Authentication-results: sourceware.org; auth=none
Hello,
recent ppc64 Linux kernels provide a new auxv entry AT_HWCAP2,
which is currently not recognized by GDB, causing every use of
"info auxv" to show an error.
This patch adds the AT_HWCAP2 define to include/elf/common.h
and handles it in GDB.
OK for mainline (for the include/ part)?
Bye,
Ulrich
include/elf/ChangeLog:
* common.h (AT_HWCAP2): Define.
gdb/ChangeLog:
* auxv.c (fprint_target_auxv): Handle AT_HWCAP2.
Index: binutils-gdb/gdb/auxv.c
===================================================================
--- binutils-gdb.orig/gdb/auxv.c
+++ binutils-gdb/gdb/auxv.c
@@ -442,6 +442,7 @@ fprint_target_auxv (struct ui_file *file
TAG (AT_IGNOREPPC, _("Entry should be ignored"), dec);
TAG (AT_BASE_PLATFORM, _("String identifying base platform"), str);
TAG (AT_RANDOM, _("Address of 16 random bytes"), hex);
+ TAG (AT_HWCAP2, _("Extension of AT_HWCAP"), hex);
TAG (AT_EXECFN, _("File name of executable"), str);
TAG (AT_SECURE, _("Boolean, was exec setuid-like?"), dec);
TAG (AT_SYSINFO, _("Special system info/entry points"), hex);
Index: binutils-gdb/include/elf/common.h
===================================================================
--- binutils-gdb.orig/include/elf/common.h
+++ binutils-gdb/include/elf/common.h
@@ -959,6 +959,7 @@
#define AT_BASE_PLATFORM 24 /* String identifying real platform,
may differ from AT_PLATFORM. */
#define AT_RANDOM 25 /* Address of 16 random bytes. */
+#define AT_HWCAP2 26 /* Extension of AT_HWCAP. */
#define AT_EXECFN 31 /* Filename of executable. */
/* Pointer to the global system page used for system calls and other
nice things. */
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com