RFA: Add readelf --unwind support for ARM

Daniel Jacobowitz dan@codesourcery.com
Tue Mar 2 15:19:00 GMT 2010


On Tue, Mar 02, 2010 at 08:01:08AM +0000, Nick Clifton wrote:
> > +  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)

> >+	  if (relsec->sh_type == SHT_REL)
> 
> 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.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Binutils mailing list