This is the mail archive of the
mailing list for the elfutils project.
Re: [PATCH] backends: Hook abi_cfi for arm.
- From: Roland McGrath <roland at hack dot frob dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Thu, 29 Aug 2013 10:51:27 -0700
- Subject: Re: [PATCH] backends: Hook abi_cfi for arm.
> Note the DWARF abi extension for ARM says that "registers intentionally
> unused" should also be initialized as if by DW_CFA_same_value. The
> example given is "an integer-only function might be included in one
> executable file for targets with VFP and another for targets without".
> We don't currently do this yet.
Seems worthwhile to include the URL to the ABI spec that talks about
DWARF and/or the function call ABI (we never did for the others, but
I'm not sure there are canonical URLs for most of them).
We have the DW_CFA_restore hack (which I could have sworn was used
somewhere--I thought we had abi_cfi for ppc long ago). So perhaps the
right thing is to use that plus explicit DW_CFA_undefined for the
Either way, this needs to cover the VFP/NEON registers (which are half
call-clobbered and half call-saved).
> + /* The link register contains the return address setup by caller. */
> + SV (14),
Should also have:
DW_CFA_register, ULEB128_7 (15), ULEB128_7 (14), /* pc = lr */
> + 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).