]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Add NT_ARM_SYSTEM_CALL aarch64 syscall regset.
authorMark Wielaard <mjw@redhat.com>
Fri, 12 Feb 2016 17:04:30 +0000 (18:04 +0100)
committerMark Wielaard <mjw@redhat.com>
Mon, 15 Feb 2016 22:51:31 +0000 (23:51 +0100)
Linux kernel 3.18 added the NT_ARM_SYSTEM_CALL regset for aarch64.
Recognize and print this new core item.

https://bugzilla.redhat.com/show_bug.cgi?id=1285613

Signed-off-by: Mark Wielaard <mjw@redhat.com>
backends/ChangeLog
backends/aarch64_corenote.c
libebl/eblcorenotetypename.c
libelf/ChangeLog
libelf/elf.h

index 4b604fd270fe0281bb0f407d3a178cf6b1f6ce2d..302646f195fc59491504fa2d06b9df165f7c2781 100644 (file)
@@ -1,3 +1,10 @@
+2016-02-12  Mark Wielaard  <mjw@redhat.com>
+
+       * aarch64_corenote.c (aarch64_syscall_items): New Ebl_Core_Item[].
+       (EXTRA_NOTES): Add NT_ARM_SYSTEM_CALL.
+       * eblcorenotetypename.c (ebl_core_note_type_name):
+       Add ARM_SYSTEM_CALL.
+
 2015-12-08  Jose E. Marchesi  <jose.marchesi@oracle.com>
 
        * sparc_init.c (sparc_init): Hook sparc_set_initial_registers_tid.
index 9b424859e6c81bdc0e11f000cae564bb4fab56da..905a4b8ab9f53796600eb8f1271ad1e276817c09 100644 (file)
@@ -99,6 +99,14 @@ static const Ebl_Core_Item aarch64_tls_items[] =
     }
   };
 
+static const Ebl_Core_Item aarch64_syscall_items [] =
+  {
+    {
+      .name = "syscall", .type = ELF_T_WORD, .format = 'x',
+      .offset = 0, .group = "register"
+    }
+  };
+
 #define AARCH64_HWBP_REG(KIND, N)                                      \
     {                                                                  \
       .name = "DBG" KIND "VR" #N "_EL1", .type = ELF_T_XWORD, .format = 'x', \
@@ -158,6 +166,7 @@ AARCH64_BP_WP_GROUP ("W", aarch64_hw_wp_items);
                      aarch64_fpregset_regs, aarch64_fpregset_items)    \
   EXTRA_ITEMS (NT_ARM_TLS, 8, aarch64_tls_items)                       \
   EXTRA_ITEMS (NT_ARM_HW_BREAK, 264, aarch64_hw_bp_items)              \
-  EXTRA_ITEMS (NT_ARM_HW_WATCH, 264, aarch64_hw_wp_items)
+  EXTRA_ITEMS (NT_ARM_HW_WATCH, 264, aarch64_hw_wp_items)              \
+  EXTRA_ITEMS (NT_ARM_SYSTEM_CALL, 4, aarch64_syscall_items)
 
 #include "linux-core-note.c"
index 826f9a1b21a407698a582b3fb19acc7b55e81174..fa81dbecc9084a1d6733de335109f757228bb8e2 100644 (file)
@@ -90,6 +90,7 @@ ebl_core_note_type_name (Ebl *ebl, uint32_t type, char *buf, size_t len)
            KNOWNSTYPE (ARM_TLS);
            KNOWNSTYPE (ARM_HW_BREAK);
            KNOWNSTYPE (ARM_HW_WATCH);
+           KNOWNSTYPE (ARM_SYSTEM_CALL);
            KNOWNSTYPE (SIGINFO);
            KNOWNSTYPE (FILE);
 #undef KNOWNSTYPE
index ec56b53479ea68dcfc1b59f2bc46d10e45ac200c..10e227e768b9cc398c59d266aafe4dcec73f1b95 100644 (file)
@@ -1,3 +1,7 @@
+2016-02-12  Mark Wielaard  <mjw@redhat.com>
+
+       * elf.h: Update from glibc. Add NT_ARM_SYSTEM_CALL.
+
 2016-02-04  Mark Wielaard  <mjw@redhat.com>
 
        * elf_getdata.c (__libelf_set_rawdata_wrlock): Don't adjust align
index 12feb915bf6e7f61b50ae1caf6bb24735c91f702..0240c3cf61ca5dd1d5827cc798222e8b8bd8e9b0 100644 (file)
@@ -667,6 +667,7 @@ typedef struct
 #define NT_ARM_TLS     0x401           /* ARM TLS register */
 #define NT_ARM_HW_BREAK        0x402           /* ARM hardware breakpoint registers */
 #define NT_ARM_HW_WATCH        0x403           /* ARM hardware watchpoint registers */
+#define NT_ARM_SYSTEM_CALL     0x404   /* ARM system call number */
 
 /* Legal values for the note segment descriptor types for object files.  */