This is the mail archive of the
mailing list for the elfutils project.
Re: [PATCH] backends: Hook abi_cfi for arm.
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Thu, 29 Aug 2013 20:23:02 +0200
- Subject: Re: [PATCH] backends: Hook abi_cfi for arm.
On Thu, 29 Aug 2013 19:51:27 +0200, Roland McGrath wrote:
> > + abi_info->return_address_register = 14; /* Link Register. */
> I think that's wrong. 14 is LR, which is just a general register that
> happens to be where the ABI says the return address is on entry. The
> "return_address_register" is for the "caller's PC" (a "virtual
> register" on machines where the PC is not directly addressable), so it
> should use 15 (PC).
BTW I used LR as return_address_register on s390 and ppc because there is no
DWARF number for PC and the CFI seems wrongly addressing LR there (moreover
under two different numbers - and really not that one of them should be PC).
So in the case of ARM having real DWARF number for PC it should be probably
used for return_address_register. But I do not know how to read .ARM.extab to
verify how the unwind tables look there - if they use the register 15.