On Fri, Jun 14, 2024 at 03:47:15PM +0100, Steve Capper wrote: > From: German Gomez <german.go...@arm.com> > > This register will be used to indicate whether a return address is > mangled with a PAC or not, in accordance with the DWARF AARCH64 ABI [1]. > > [1] > https://github.com/ARM-software/abi-aa/blob/main/aadwarf64/aadwarf64.rst#41dwarf-register-names
OK, so DWARF regno 34 turns from "reserved" into the ra_sign_state. Patch looks good except for... > --- a/backends/aarch64_init.c > +++ b/backends/aarch64_init.c > @@ -55,10 +55,10 @@ aarch64_init (Elf *elf __attribute__ ((unused)), > HOOK (eh, data_marker_symbol); > HOOK (eh, abi_cfi); > > - /* X0-X30 (31 regs) + SP + 1 Reserved + ELR, 30 Reserved regs (34-43) > + /* X0-X30 (31 regs) + SP + 1 Reserved + ELR + RA_SIGN_STATE, 30 Reserved > regs (34-43) > + V0-V31 (32 regs, least significant 64 bits only) > - + ALT_FRAME_RETURN_COLUMN (used when LR isn't used) = 97 DWARF regs. */ > - eh->frame_nregs = 97; > + + ALT_FRAME_RETURN_COLUMN (used when LR isn't used) = 98 DWARF regs. */ > + eh->frame_nregs = 98; > HOOK (eh, set_initial_registers_tid); > HOOK (eh, unwind); That should still be 97. RA_SIGN_STATE is regno 34, which was reserved before, followed by 29 Resered regs (35-43). Cheers, Mark