public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Indu Bhagat <indu.bhagat@oracle.com>
To: binutils@sourceware.org
Cc: nickc@redhat.com, Indu Bhagat <indu.bhagat@oracle.com>
Subject: [COMMITTED, V2 3/5] [3/5] objdump/readelf: sframe: emit marker for SFrame FDE with B key
Date: Mon, 19 Dec 2022 12:23:26 -0800	[thread overview]
Message-ID: <20221219202328.1442022-4-indu.bhagat@oracle.com> (raw)
In-Reply-To: <20221219202328.1442022-1-indu.bhagat@oracle.com>

[No changes in V2]

ChangeLog:

	* libsframe/sframe-dump.c (is_sframe_abi_arch_aarch64): New
	definition.
	(dump_sframe_func_with_fres): emit a string if B key is used.
---
 libsframe/sframe-dump.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/libsframe/sframe-dump.c b/libsframe/sframe-dump.c
index 5f778bee338..c00ff401685 100644
--- a/libsframe/sframe-dump.c
+++ b/libsframe/sframe-dump.c
@@ -25,6 +25,21 @@
 
 #define SFRAME_HEADER_FLAGS_STR_MAX_LEN 50
 
+/* Return TRUE if the SFrame section is associated with the aarch64 ABIs.  */
+
+static bool
+is_sframe_abi_arch_aarch64 (sframe_decoder_ctx *sfd_ctx)
+{
+  bool aarch64_p = false;
+
+  unsigned char abi_arch = sframe_decoder_get_abi_arch (sfd_ctx);
+  if ((abi_arch == SFRAME_ABI_AARCH64_ENDIAN_BIG)
+      || (abi_arch == SFRAME_ABI_AARCH64_ENDIAN_LITTLE))
+    aarch64_p = true;
+
+  return aarch64_p;
+}
+
 static void
 dump_sframe_header (sframe_decoder_ctx *sfd_ctx)
 {
@@ -113,6 +128,10 @@ dump_sframe_func_with_fres (sframe_decoder_ctx *sfd_ctx,
 	  func_start_pc_vma,
 	  func_size);
 
+  if (is_sframe_abi_arch_aarch64 (sfd_ctx)
+      && (SFRAME_V1_FUNC_PAUTH_KEY (func_info) == SFRAME_AARCH64_PAUTH_KEY_B))
+    printf (", pauth = B key");
+
   char temp[100];
   memset (temp, 0, 100);
 
-- 
2.37.2


  parent reply	other threads:[~2022-12-19 20:23 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-14 20:07 [PATCH 0/5] SFrame: add support for .cfi_b_key_frame Indu Bhagat
2022-12-14 20:07 ` [PATCH 1/5] [1/5] sframe.h: " Indu Bhagat
2022-12-14 20:07 ` [PATCH 2/5] [2/5] gas: sframe: " Indu Bhagat
2022-12-14 20:07 ` [PATCH 3/5] [3/5] objdump/readelf: sframe: emit marker for SFrame FDE with B key Indu Bhagat
2022-12-14 20:07 ` [PATCH 4/5] [4/5] gas: sframe: testsuite: add testcase for .cfi_b_key_frame Indu Bhagat
2022-12-14 20:07 ` [PATCH 5/5] [5/5] sframe: doc: update documentation for pauth key in SFrame FDE Indu Bhagat
2022-12-19 15:36 ` [PATCH 0/5] SFrame: add support for .cfi_b_key_frame Nick Clifton
2022-12-19 17:27   ` Indu Bhagat
2022-12-19 20:23   ` [COMMITTED, V2 " Indu Bhagat
2022-12-19 20:23     ` [COMMITTED, V2 1/5] [1/5] sframe.h: " Indu Bhagat
2022-12-19 20:23     ` [COMMITTED, V2 2/5] [2/5] gas: sframe: " Indu Bhagat
2022-12-19 20:23     ` Indu Bhagat [this message]
2022-12-19 20:23     ` [COMMITTED, V2 4/5] [4/5] gas: sframe: testsuite: add testcase " Indu Bhagat
2022-12-19 20:23     ` [COMMITTED, V2 5/5] [5/5] sframe: doc: update documentation for pauth key in SFrame FDE Indu Bhagat
2022-12-19 21:11     ` [COMMITTED, V2 0/5] SFrame: add support for .cfi_b_key_frame Indu Bhagat
2022-12-19 21:14   ` [PATCH, " Indu Bhagat
2022-12-19 21:14     ` [PATCH, V2 1/5] [1/5] sframe.h: " Indu Bhagat
2022-12-19 21:14     ` [PATCH, V2 2/5] [2/5] gas: sframe: " Indu Bhagat
2022-12-19 21:14     ` [PATCH, V2 3/5] [3/5] objdump/readelf: sframe: emit marker for SFrame FDE with B key Indu Bhagat
2022-12-19 21:14     ` [PATCH, V2 4/5] [4/5] gas: sframe: testsuite: add testcase for .cfi_b_key_frame Indu Bhagat
2022-12-19 21:14     ` [PATCH, V2 5/5] [5/5] sframe: doc: update documentation for pauth key in SFrame FDE Indu Bhagat
2022-12-21 18:19     ` [PATCH, V2 0/5] SFrame: add support for .cfi_b_key_frame Indu Bhagat
2022-12-22  8:40       ` Nick Clifton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221219202328.1442022-4-indu.bhagat@oracle.com \
    --to=indu.bhagat@oracle.com \
    --cc=binutils@sourceware.org \
    --cc=nickc@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).