RFA: Add readelf --unwind support for ARM
Nick Clifton
nickc@redhat.com
Tue Mar 2 15:22:00 GMT 2010
Hi Daniel,
>>> + if (elf_header.e_machine == EM_ARM)
>>> + addr.offset&= ~1;
>>
>> I suspect that this behaviour might be needed for other architectures
>> as well (MIPS16 maybe ?). So you might as well use a macro that
>> tests e_machine and returns an unmangled offset.
>
> Could you give me an example of what you mean? Something like this?
>
> #define REMOVE_ARCH_BITS(ADDR) do { \
> if (elf_header.e_machine == EM_ARM) \
> ADDR&= ~1; \
> } while (0)
Yeah, exactly that.
>> Just curious - are there any ARM binaries that use REL relocations
>> and have unwind tables ?
>
> In practice, I'm not sure. I know there are REL ARM binaries -
> VxWorks uses REL, but last I checked it wasn't on the EABI yet.
Hmm, well no reason to penalize them if they do change, so I guess
supporting both types of relocation is worthwhile.
Cheers
Nick
More information about the Binutils
mailing list