From: Indu Bhagat <indu.bhagat@oracle.com>
To: binutils@sourceware.org
Cc: Indu Bhagat <indu.bhagat@oracle.com>
Subject: [PATCH 5/6] [5/6] objdump/readelf: sframe: emit marker for FREs with mangled RA
Date: Wed, 14 Dec 2022 11:58:58 -0800 [thread overview]
Message-ID: <20221214195859.1233809-6-indu.bhagat@oracle.com> (raw)
In-Reply-To: <20221214195859.1233809-1-indu.bhagat@oracle.com>
In the textual dump of the SFrame section, when an SFrame FRE recovers a
mangled RA, use string "[s]" in the output to indicate that the return
address is a signed (mangled) one.
ChangeLog:
* libsframe/sframe-dump.c (dump_sframe_func_with_fres): Postfix
with "[s]" if RA is signed with authorization code.
---
libsframe/sframe-dump.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/libsframe/sframe-dump.c b/libsframe/sframe-dump.c
index 5b063c9962d..8e5cd6116ef 100644
--- a/libsframe/sframe-dump.c
+++ b/libsframe/sframe-dump.c
@@ -116,7 +116,7 @@ dump_sframe_func_with_fres (sframe_decoder_ctx *sfd_ctx,
char temp[100];
memset (temp, 0, 100);
- printf ("\n %-7s%-8s %-10s%-10s%-10s", "STARTPC", fde_type_marker, "CFA", "FP", "RA");
+ printf ("\n %-7s%-8s %-10s%-10s%-13s", "STARTPC", fde_type_marker, "CFA", "FP", "RA");
for (j = 0; j < num_fres; j++)
{
sframe_decoder_get_fre (sfd_ctx, funcidx, j, &fre);
@@ -149,10 +149,17 @@ dump_sframe_func_with_fres (sframe_decoder_ctx *sfd_ctx,
/* Dump RA info. */
memset (temp, 0, 100);
if (err[2] == 0)
- sprintf (temp, "c%+d", ra_offset);
+ {
+ /* Mark SFrame FRE's RA information with "[s]" if the RA is mangled
+ with signature bits. */
+ const char *ra_mangled_p_str
+ = ((sframe_fre_get_ra_mangled_p (sfd_ctx, &fre, &err[2]))
+ ? "[s]" : " ");
+ sprintf (temp, "c%+d%-3s", ra_offset, ra_mangled_p_str);
+ }
else
strcpy (temp, "u");
- printf ("%-10s", temp);
+ printf ("%-13s", temp);
}
}
--
2.37.2
next prev parent reply other threads:[~2022-12-14 19:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-14 19:58 [PATCH 0/6] SFrame: support for .cfi_negate_ra_state in aarch64 Indu Bhagat
2022-12-14 19:58 ` [PATCH 1/6] [1/6] sframe.h: add support for .cfi_negate_ra_state Indu Bhagat
2022-12-14 19:58 ` [PATCH 2/6] [2/6] gas: sframe: " Indu Bhagat
2022-12-14 19:58 ` [PATCH 3/6] [3/6] gas: sframe: testsuite: add testcase " Indu Bhagat
2022-12-14 19:58 ` [PATCH 4/6] [4/6] libsframe: provide new access API for mangled RA bit Indu Bhagat
2022-12-14 19:58 ` Indu Bhagat [this message]
2022-12-14 19:58 ` [PATCH 6/6] [6/6] sframe: doc: update spec for the mangled-RA bit in FRE Indu Bhagat
2022-12-16 16:39 ` [PATCH 0/6] SFrame: support for .cfi_negate_ra_state in aarch64 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=20221214195859.1233809-6-indu.bhagat@oracle.com \
--to=indu.bhagat@oracle.com \
--cc=binutils@sourceware.org \
/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).