Add 3 new PAC-related ARM note types

The following patch synchronizes includes/objdump/readelf with the Linux
Kernel in terms of ARM regset notes.

We're currently missing 3 of them:

NT_ARM_PACA_KEYS
NT_ARM_PACG_KEYS
NT_ARM_PAC_ENABLED_KEYS

We don't need GDB to bother with this at the moment, so this doesn't update
bfd/elf.c. If needed, we can do it in the future.

binutils/

	* readelf.c (get_note_type): Handle new ARM PAC notes.

include/elf/

	* common.h (NT_ARM_PACA_KEYS, NT_ARM_PACG_KEYS)
	(NT_ARM_PAC_ENABLED_KEYS): New constants.
This commit is contained in:
Luis Machado
2021-08-05 13:50:17 -03:00
parent 4f212c5520
commit 3af2785c97
2 changed files with 15 additions and 0 deletions

View File

@ -672,9 +672,18 @@
/* note name must be "LINUX". */
#define NT_ARM_PAC_MASK 0x406 /* AArch pointer authentication code masks */
/* note name must be "LINUX". */
#define NT_ARM_PACA_KEYS 0x407 /* ARM pointer authentication address
keys */
/* note name must be "LINUX". */
#define NT_ARM_PACG_KEYS 0x408 /* ARM pointer authentication generic
keys */
/* note name must be "LINUX". */
#define NT_ARM_TAGGED_ADDR_CTRL 0x409 /* AArch64 tagged address control
(prctl()) */
/* note name must be "LINUX". */
#define NT_ARM_PAC_ENABLED_KEYS 0x40a /* AArch64 pointer authentication
enabled keys (prctl()) */
/* note name must be "LINUX". */
#define NT_ARC_V2 0x600 /* ARC HS accumulator/extra registers. */
/* note name must be "LINUX". */
#define NT_RISCV_CSR 0x900 /* RISC-V Control and Status Registers */