[Arm,Readelf] Support for a new pacbti unwind opcode.

Message ID AM5PR0801MB1844DD5716D68F0CDD88B1B9EAAF9@AM5PR0801MB1844.eurprd08.prod.outlook.com
State New
Headers show
Series
  • [Arm,Readelf] Support for a new pacbti unwind opcode.
Related show

Commit Message

Alan Modra via Binutils Oct. 5, 2021, 8:43 a.m.
Hi,

This patch adds readelf support for decoding the exception table opcode for restoring the RA_AUTH_CODE pseudo register defined by the EHABI (https://github.com/ARM-software/abi-aa/releases/download/2021Q1/ehabi32.pdf Section 10.3).

Tested for arm-none-eabi. OK for master?

Thanks,
Tejas.

binutils/Changelog:

2021-10-05  Tejas Belagod  <tejas.belagod@arm.com>

	* readelf.c (decode_arm_unwind_bytecode): Add support to decode restoring
	RA_AUTH_CODE pseudo register.

Patch

diff --git a/binutils/readelf.c b/binutils/readelf.c
index 4a6fcff3cc1237a1c801cd8912c18eabf3fb1f33..a9dd3f936821a6d3c83ffb0b26a86bac0a07abd8 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -9370,6 +9370,8 @@  decode_arm_unwind_bytecode (Filedata *                 filedata,
 	    printf ("-D%d", first + last);
 	  printf ("}");
 	}
+      else if (op == 0xb4)
+	printf (_("     pop {ra_auth_code}"));
       else if ((op & 0xf8) == 0xb8 || (op & 0xf8) == 0xd0)
 	{
 	  unsigned int count = op & 0x07;